55 return $this->addressBookInfo[
'uri'];
67 $obj = $this->carddavBackend->getCard($this->addressBookInfo[
'id'],
$name);
68 if (!$obj)
throw new DAV\Exception\NotFound(
'Card not found');
69 return new Card($this->carddavBackend, $this->addressBookInfo, $obj);
80 $objs = $this->carddavBackend->getCards($this->addressBookInfo[
'id']);
82 foreach ($objs as $obj) {
84 $children[] =
new Card($this->carddavBackend, $this->addressBookInfo, $obj);
101 $objs = $this->carddavBackend->getMultipleCards($this->addressBookInfo[
'id'], $paths);
103 foreach ($objs as $obj) {
105 $children[] =
new Card($this->carddavBackend, $this->addressBookInfo, $obj);
121 throw new DAV\Exception\MethodNotAllowed(
'Creating collections in addressbooks is not allowed');
138 if (is_resource($vcardData)) {
139 $vcardData = stream_get_contents($vcardData);
144 return $this->carddavBackend->createCard($this->addressBookInfo[
'id'],
$name, $vcardData);
155 $this->carddavBackend->deleteAddressBook($this->addressBookInfo[
'id']);
167 throw new DAV\Exception\MethodNotAllowed(
'Renaming addressbooks is not yet supported');
196 return $this->carddavBackend->updateAddressBook($this->addressBookInfo[
'id'], $propPatch);
214 foreach ($properties as $propertyName) {
216 if (isset($this->addressBookInfo[$propertyName])) {
218 $response[$propertyName] = $this->addressBookInfo[$propertyName];
237 return $this->addressBookInfo[
'principaluri'];
253 'privilege' =>
'{DAV:}all',
274 $this->carddavBackend instanceof Backend\SyncSupport &&
275 isset($this->addressBookInfo[
'{DAV:}sync-token'])
277 return $this->addressBookInfo[
'{DAV:}sync-token'];
280 $this->carddavBackend instanceof Backend\SyncSupport &&
281 isset($this->addressBookInfo[
'{http://sabredav.org/ns}sync-token'])
283 return $this->addressBookInfo[
'{http://sabredav.org/ns}sync-token'];
345 if (!$this->carddavBackend instanceof Backend\SyncSupport) {
349 return $this->carddavBackend->getChangesForAddressBook(
350 $this->addressBookInfo[
'id'],
getChild($name)
Returns a card.
getChildACL()
This method returns the ACL's for card nodes in this address book.
propPatch(DAV\PropPatch $propPatch)
Updates properties on this node.
getSyncToken()
This method returns the current sync-token for this collection.
getProperties($properties)
Returns a list of properties for this nodes.
This class represents a set of properties that are going to be updated.
static ensureUTF8($input)
This method takes an input string, checks if it's not valid UTF-8 and attempts to convert it to UTF-8...
The Card object represents a single Card from an addressbook.
createFile($name, $vcardData=null)
Creates a new file.
The AddressBook class represents a CardDAV addressbook, owned by a specific user. ...
getChanges($syncToken, $syncLevel, $limit=null)
The getChanges method returns all the changes that have happened, since the specified syncToken and t...
getChildren()
Returns the full list of cards.
createDirectory($name)
Creates a new directory.
getMultipleChildren(array $paths)
This method receives a list of paths in it's first argument.
If a class extends ISyncCollection, it supports WebDAV-sync.
setName($newName)
Renames the addressbook.
__construct(Backend\BackendInterface $carddavBackend, array $addressBookInfo)
Constructor.
getOwner()
Returns the owner principal.
getLastModified()
Returns the last modification date as a unix timestamp.
getName()
Returns the name of the addressbook.