Ejemplo n.º 1
0
 /**
  * Returns a card
  *
  * @param string $name
  * @return \ICard
  */
 public function getChild($name)
 {
     $obj = $this->carddavBackend->getCard($this->addressBookInfo['id'], $name);
     if (!$obj) {
         throw new DAV\Exception\NotFound('Card not found');
     }
     return new Card($this->carddavBackend, $this->addressBookInfo, $obj);
 }
Ejemplo n.º 2
0
 /**
  * Returns the VCard-formatted object
  *
  * @return string
  */
 public function get()
 {
     // Pre-populating 'carddata' is optional. If we don't yet have it
     // already, we fetch it from the backend.
     if (!isset($this->cardData['carddata'])) {
         $this->cardData = $this->carddavBackend->getCard($this->addressBookInfo['id'], $this->cardData['uri']);
     }
     return $this->cardData['carddata'];
 }