registerPackage('Zend_Gdata_Contacts'); $this->registerPackage('Zend_Gdata_Contacts_Extension'); // used for new* creation parent::__construct($client, $applicationId); $this->setMajorProtocolVersion(self::CONTACTS_MAJOR_PROTOCOL_VERSION); $this->setMinorProtocolVersion(self::CONTACTS_MINOR_PROTOCOL_VERSION); $this->_httpClient->setParameterPost('service', self::AUTH_SERVICE_NAME); } public function setProjection($value) { $this->_projection = $value; return $this; } public function getProjection() { return $this->_projection; } public function insertContact($contact, $uri=null) { if ($uri == null) { $uri = $this->_defaultPostUri; } $newContact = $this->insertEntry($contact, $uri, 'Zend_Gdata_Contacts_ContactEntry'); return $newContact; } public function getContactListFeed($location = null) { if ($location == null) { $uri = self::CONTACTS_FEED_URI . '/default/full'; } else if ($location instanceof Zend_Gdata_Query) { $uri = $location->getQueryUrl(); } else { $uri = $location; } return parent::getFeed($uri, 'Zend_Gdata_Contacts_ListFeed'); } public function getContactListEntry($location = NULL) { if ($location == null) { require_once 'Zend/Gdata/App/InvalidArgumentException.php'; throw new Zend_Gdata_App_InvalidArgumentException( 'Location must not be null'); } else if ($location instanceof Zend_Gdata_Query) { $uri = $location->getQueryUrl(); } else { $uri = $location; } return parent::getEntry($uri,'Zend_Gdata_Contacts_ContactEntry'); } }