Nextcloud PHP API (master)

IAddressBook

Interface IAddressBook

Tags
since
5.0.0

Table of Contents

Methods

createOrUpdate()  : array<string|int, mixed>
delete()  : bool
getDisplayName()  : mixed
In comparison to getKey() this function returns a human readable (maybe translated) name
getKey()  : string
getPermissions()  : mixed
getUri()  : string
isShared()  : bool
Returns true if this address-book is not owned by the current user, but shared with them.
isSystemAddressBook()  : bool
search()  : array<string|int, mixed>

Methods

createOrUpdate()

public createOrUpdate(array<string|int, mixed> $properties) : array<string|int, mixed>
Parameters
$properties : array<string|int, mixed>

this array if key-value-pairs defines a contact

Tags
since
5.0.0
Return values
array<string|int, mixed>

an array representing the contact just created or updated

delete()

public delete(int $id) : bool
Parameters
$id : int

the unique identifier to a contact

Tags
since
5.0.0
Return values
bool

successful or not

getDisplayName()

In comparison to getKey() this function returns a human readable (maybe translated) name

public getDisplayName() : mixed
Tags
since
5.0.0

getKey()

public getKey() : string
Tags
since
5.0.0
Return values
string

defining the technical unique key

getPermissions()

public getPermissions() : mixed
Tags
since
5.0.0

getUri()

public getUri() : string
Tags
since
16.0.0
Return values
string

defining the unique uri

isShared()

Returns true if this address-book is not owned by the current user, but shared with them.

public isShared() : bool
Tags
since
20.0.0
Return values
bool

isSystemAddressBook()

public isSystemAddressBook() : bool
Tags
since
20.0.0
Return values
bool
public search(string $pattern, array<string|int, mixed> $searchProperties, array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
$pattern : string

which should match within the $searchProperties

$searchProperties : array<string|int, mixed>

defines the properties within the query pattern should match

$options : array<string|int, mixed>

Options to define the output format and search behavior

  • 'types' boolean (since 15.0.0) If set to true, fields that come with a TYPE property will be an array example: ['id' => 5, 'FN' => 'Thomas Tanghus', 'EMAIL' => ['type => 'HOME', 'value' => 'g@h.i']]
  • 'escape_like_param' - If set to false wildcards _ and % are not escaped
  • 'limit' - Set a numeric limit for the search results
  • 'offset' - Set the offset for the limited search results
  • 'wildcard' - (since 23.0.0) Whether the search should use wildcards
Tags
psalm-param

array{types?: bool, escape_like_param?: bool, limit?: int, offset?: int, wildcard?: bool} $options

since
5.0.0
Return values
array<string|int, mixed>

an array of contacts which are arrays of key-value-pairs example result: [ ['id' => 0, 'FN' => 'Thomas Müller', 'EMAIL' => 'a@b.c', 'GEO' => '37.386013;-122.082932'], ['id' => 5, 'FN' => 'Thomas Tanghus', 'EMAIL' => ['d@e.f', 'g@h.i']] ]


        
On this page

Search results