IAddressBook

interface OCP\IAddressBook
Interface IAddressBook
Source:lib/public/IAddressBook.php#40

Methods

public OCP\IAddressBook::getKey()
Source:lib/public/IAddressBook.php#46
Returns:string defining the technical unique key
Since:5.0.0
public OCP\IAddressBook::getUri()
Source:lib/public/IAddressBook.php#53
Returns:string defining the unique uri
Since:16.0.0
Returns:string defining the unique uri
public OCP\IAddressBook::getDisplayName()
In comparison to getKey() this function returns a human readable (maybe translated) name
Source:lib/public/IAddressBook.php#60
Returns:mixed
Since:5.0.0
public OCP\IAddressBook::search($pattern, $searchProperties, $options)
Source:

lib/public/IAddressBook.php#77

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_like_param’ - If set to false wildcards _ and % are not escaped
Returns:
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‘]]

]

Since:

5.0.0

public OCP\IAddressBook::createOrUpdate($properties)
Source:

lib/public/IAddressBook.php#84

Parameters:
  • $properties (array) this array if key-value-pairs defines a contact
Returns:

array an array representing the contact just created or updated

Since:

5.0.0

public OCP\IAddressBook::getPermissions()
Source:lib/public/IAddressBook.php#95
Returns:mixed
Since:5.0.0
public OCP\IAddressBook::delete($id)
Source:

lib/public/IAddressBook.php#102

Parameters:
  • $id (object) the unique identifier to a contact
Returns:

bool successful or not

Since:

5.0.0