Ejemplo n.º 1
0
 /**
  * @param int $iUserId
  * @param \afterlogic\DAV\CardDAV\AddressBook $oAddressBook
  * @return bool | array
  */
 protected function getObjectItems($iUserId, $oAddressBook)
 {
     $mResult = false;
     $sName = null;
     if ($oAddressBook) {
         $sName = $oAddressBook->getName();
         if (!isset($this->aContactItemsCache[$sName])) {
             $this->Init($iUserId);
             $this->aContactItemsCache[$sName] = array();
             foreach ($oAddressBook->getChildren() as $oChild) {
                 $this->aContactItemsCache[$sName][$oChild->getName()] = $oChild;
             }
         }
         $mResult = $this->aContactItemsCache[$sName];
     }
     return $mResult;
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  *
  * @param Backend\BackendInterface $carddavBackend
  * @param array $addressBookInfo
  */
 public function __construct(\Sabre\CardDAV\Backend\BackendInterface $carddavBackend, array $addressBookInfo, $principalUri)
 {
     parent::__construct($carddavBackend, $addressBookInfo);
     $this->principalUri = $principalUri;
 }