Nextcloud PHP API (stable19)

IAddressBook

Interface IAddressBook

Tags
since
5.0.0

Table of Contents

createOrUpdate()  : array
delete()  : bool
getDisplayName()  : mixed
In comparison to getKey() this function returns a human readable (maybe translated) name
getKey()  : string
getPermissions()  : mixed
getUri()  : string
search()  : array

Methods

createOrUpdate()

public createOrUpdate(array $properties) : array
Parameters
$properties : array

this array if key-value-pairs defines a contact

Tags
since
5.0.0
Return values
array

an array representing the contact just created or updated

delete()

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

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
Return values
mixed

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
Return values
mixed

getUri()

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

defining the unique uri

public search(string $pattern, array $searchProperties, array $options) : array
Parameters
$pattern : string

which should match within the $searchProperties

$searchProperties : array

defines the properties within the query pattern should match

$options : array

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_likeparam' - 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
Tags
since
5.0.0
Return values
array

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']] ]

Search results