ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
The AddressBook class represents a CardDAV addressbook, owned by a specific user. More...
Public Member Functions | |
__construct (Backend\BackendInterface $carddavBackend, array $addressBookInfo) | |
Constructor. More... | |
getName () | |
Returns the name of the addressbook. More... | |
getChild ($name) | |
Returns a card. More... | |
getChildren () | |
Returns the full list of cards. More... | |
getMultipleChildren (array $paths) | |
This method receives a list of paths in it's first argument. More... | |
createDirectory ($name) | |
Creates a new directory. More... | |
createFile ($name, $vcardData=null) | |
Creates a new file. More... | |
delete () | |
Deletes the entire addressbook. More... | |
setName ($newName) | |
Renames the addressbook. More... | |
getLastModified () | |
Returns the last modification date as a unix timestamp. More... | |
propPatch (DAV\PropPatch $propPatch) | |
Updates properties on this node. More... | |
getProperties ($properties) | |
Returns a list of properties for this nodes. More... | |
getOwner () | |
Returns the owner principal. More... | |
getChildACL () | |
This method returns the ACL's for card nodes in this address book. More... | |
getSyncToken () | |
This method returns the current sync-token for this collection. More... | |
getChanges ($syncToken, $syncLevel, $limit=null) | |
The getChanges method returns all the changes that have happened, since the specified syncToken and the current collection. More... | |
Public Member Functions inherited from Sabre\DAV\Collection | |
getChild ($name) | |
Returns a child object, by its name. More... | |
childExists ($name) | |
Checks is a child-node exists. More... | |
createFile ($name, $data=null) | |
Creates a new file in the directory. More... | |
createDirectory ($name) | |
Creates a new subdirectory. More... | |
Public Member Functions inherited from Sabre\DAV\Node | |
getLastModified () | |
Returns the last modification time as a unix timestamp. More... | |
delete () | |
Deletes the current node. More... | |
setName ($name) | |
Renames the node. More... | |
Public Member Functions inherited from Sabre\DAV\IProperties | |
propPatch (PropPatch $propPatch) | |
Updates properties on this node. More... | |
Public Member Functions inherited from Sabre\DAVACL\IACL | |
getGroup () | |
Returns a group principal. More... | |
getACL () | |
Returns a list of ACE's for this node. More... | |
setACL (array $acl) | |
Updates the ACL. More... | |
getSupportedPrivilegeSet () | |
Returns the list of supported privileges for this node. More... | |
Protected Attributes | |
$addressBookInfo | |
$carddavBackend | |
The AddressBook class represents a CardDAV addressbook, owned by a specific user.
The AddressBook can contain multiple vcards
Definition at line 17 of file AddressBook.php.
Sabre\CardDAV\AddressBook::__construct | ( | Backend\BackendInterface | $carddavBackend, |
array | $addressBookInfo | ||
) |
Constructor.
Backend\BackendInterface | $carddavBackend | |
array | $addressBookInfo |
Definition at line 41 of file AddressBook.php.
References Sabre\CardDAV\AddressBook\$addressBookInfo, and Sabre\CardDAV\AddressBook\$carddavBackend.
Sabre\CardDAV\AddressBook::createDirectory | ( | $name | ) |
Creates a new directory.
We actually block this, as subdirectories are not allowed in addressbooks.
string | $name |
Implements Sabre\DAV\ICollection.
Definition at line 119 of file AddressBook.php.
Sabre\CardDAV\AddressBook::createFile | ( | $name, | |
$vcardData = null |
|||
) |
Creates a new file.
The contents of the new file must be a valid VCARD.
This method may return an ETag.
string | $name | |
resource | $vcardData |
Implements Sabre\DAV\ICollection.
Definition at line 136 of file AddressBook.php.
References $name, and Sabre\DAV\StringUtil\ensureUTF8().
Sabre\CardDAV\AddressBook::delete | ( | ) |
Deletes the entire addressbook.
Implements Sabre\DAV\INode.
Definition at line 153 of file AddressBook.php.
Sabre\CardDAV\AddressBook::getChanges | ( | $syncToken, | |
$syncLevel, | |||
$limit = null |
|||
) |
The getChanges method returns all the changes that have happened, since the specified syncToken and the current collection.
This function should return an array, such as the following:
[ 'syncToken' => 'The current synctoken', 'added' => [ 'new.txt', ], 'modified' => [ 'modified.txt', ], 'deleted' => [ 'foo.php.bak', 'old.txt' ] ];
The syncToken property should reflect the current syncToken of the collection, as reported getSyncToken(). This is needed here too, to ensure the operation is atomic.
If the syncToken is specified as null, this is an initial sync, and all members should be reported.
The modified property is an array of nodenames that have changed since the last token.
The deleted property is an array with nodenames, that have been deleted from collection.
The second argument is basically the 'depth' of the report. If it's 1, you only have to report changes that happened only directly in immediate descendants. If it's 2, it should also include changes from the nodes below the child collections. (grandchildren)
The third (optional) argument allows a client to specify how many results should be returned at most. If the limit is not specified, it should be treated as infinite.
If the limit (infinite or not) is higher than you're willing to return, you should throw a Sabre() exception.
If the syncToken is expired (due to data cleanup) or unknown, you must return null.
The limit is 'suggestive'. You are free to ignore it.
string | $syncToken | |
int | $syncLevel | |
int | $limit |
Implements Sabre\DAV\Sync\ISyncCollection.
Definition at line 343 of file AddressBook.php.
Sabre\CardDAV\AddressBook::getChild | ( | $name | ) |
Returns a card.
string | $name |
Implements Sabre\DAV\ICollection.
Definition at line 65 of file AddressBook.php.
References $name.
Sabre\CardDAV\AddressBook::getChildACL | ( | ) |
This method returns the ACL's for card nodes in this address book.
The result of this method automatically gets passed to the card nodes in this address book.
Definition at line 249 of file AddressBook.php.
References Sabre\CardDAV\AddressBook\getOwner().
Referenced by Sabre\CardDAV\AddressBook\getChildren(), and Sabre\CardDAV\AddressBook\getMultipleChildren().
Sabre\CardDAV\AddressBook::getChildren | ( | ) |
Returns the full list of cards.
Implements Sabre\DAV\ICollection.
Definition at line 78 of file AddressBook.php.
References Sabre\CardDAV\AddressBook\getChildACL().
Sabre\CardDAV\AddressBook::getLastModified | ( | ) |
Returns the last modification date as a unix timestamp.
Implements Sabre\DAV\INode.
Definition at line 176 of file AddressBook.php.
Sabre\CardDAV\AddressBook::getMultipleChildren | ( | array | $paths | ) |
This method receives a list of paths in it's first argument.
It must return an array with Node objects.
If any children are not found, you do not have to return them.
string[] | $paths |
Implements Sabre\DAV\IMultiGet.
Definition at line 99 of file AddressBook.php.
References Sabre\CardDAV\AddressBook\getChildACL().
Sabre\CardDAV\AddressBook::getName | ( | ) |
Returns the name of the addressbook.
Implements Sabre\DAV\INode.
Definition at line 53 of file AddressBook.php.
Sabre\CardDAV\AddressBook::getOwner | ( | ) |
Returns the owner principal.
This must be a url to a principal, or null if there's no owner
Implements Sabre\DAVACL\IACL.
Definition at line 235 of file AddressBook.php.
Referenced by Sabre\CardDAV\AddressBook\getChildACL().
Sabre\CardDAV\AddressBook::getProperties | ( | $properties | ) |
Returns a list of properties for this nodes.
The properties list is a list of propertynames the client requested, encoded in clark-notation {xmlnamespace}tagname
If the array is empty, it means 'all properties' were requested.
array | $properties |
Implements Sabre\DAV\IProperties.
Definition at line 211 of file AddressBook.php.
References $response.
Sabre\CardDAV\AddressBook::getSyncToken | ( | ) |
This method returns the current sync-token for this collection.
This can be any string.
If null is returned from this function, the plugin assumes there's no sync information available.
Implements Sabre\DAV\Sync\ISyncCollection.
Definition at line 271 of file AddressBook.php.
Sabre\CardDAV\AddressBook::propPatch | ( | DAV\PropPatch | $propPatch | ) |
Updates properties on this node.
This method received a PropPatch object, which contains all the information about the update.
To update specific properties, call the 'handle' method on this object. Read the PropPatch documentation for more information.
DAV\PropPatch | $propPatch |
Definition at line 194 of file AddressBook.php.
Sabre\CardDAV\AddressBook::setName | ( | $newName | ) |
Renames the addressbook.
string | $newName |
Implements Sabre\DAV\INode.
Definition at line 165 of file AddressBook.php.
|
protected |
Definition at line 26 of file AddressBook.php.
Referenced by Sabre\CardDAV\AddressBook\__construct().
|
protected |
Definition at line 33 of file AddressBook.php.
Referenced by Sabre\CardDAV\AddressBook\__construct().