. * */ namespace OCA\Contacts\CardDAV; /** * This class overrides Sabre_CardDAV_UserAddressBooks::getChildren() * to instantiate \OCA\Contacts\CardDAV\AddressBooks. */ class UserAddressBooks extends \Sabre_CardDAV_UserAddressBooks { /** * Returns a list of addressbooks * * @return array */ public function getChildren() { $addressbooks = $this->carddavBackend->getAddressbooksForUser($this->principalUri); $objs = array(); foreach($addressbooks as $addressbook) { $objs[] = new AddressBook($this->carddavBackend, $addressbook); } return $objs; } }