2015-11-05 18:46:37 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace OCA\DAV\CardDAV;
|
|
|
|
|
2015-11-20 15:35:23 +03:00
|
|
|
class UserAddressBooks extends \Sabre\CardDAV\AddressBookHome {
|
2015-11-05 18:46:37 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a list of addressbooks
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
function getChildren() {
|
|
|
|
|
|
|
|
$addressbooks = $this->carddavBackend->getAddressBooksForUser($this->principalUri);
|
|
|
|
$objs = [];
|
|
|
|
foreach($addressbooks as $addressbook) {
|
|
|
|
$objs[] = new AddressBook($this->carddavBackend, $addressbook);
|
|
|
|
}
|
|
|
|
return $objs;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|