diff -r 000000000000 -r 4eba9c11703f web/Zend/Service/Technorati/Author.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/Zend/Service/Technorati/Author.php Mon Dec 13 18:29:26 2010 +0100 @@ -0,0 +1,242 @@ +ownerDocument); + + $result = $xpath->query('./firstname/text()', $dom); + if ($result->length == 1) $this->setFirstName($result->item(0)->data); + + $result = $xpath->query('./lastname/text()', $dom); + if ($result->length == 1) $this->setLastName($result->item(0)->data); + + $result = $xpath->query('./username/text()', $dom); + if ($result->length == 1) $this->setUsername($result->item(0)->data); + + $result = $xpath->query('./description/text()', $dom); + if ($result->length == 1) $this->setDescription($result->item(0)->data); + + $result = $xpath->query('./bio/text()', $dom); + if ($result->length == 1) $this->setBio($result->item(0)->data); + + $result = $xpath->query('./thumbnailpicture/text()', $dom); + if ($result->length == 1) $this->setThumbnailPicture($result->item(0)->data); + } + + + /** + * Returns Author first name. + * + * @return string Author first name + */ + public function getFirstName() { + return $this->_firstName; + } + + /** + * Returns Author last name. + * + * @return string Author last name + */ + public function getLastName() { + return $this->_lastName; + } + + /** + * Returns Technorati account username. + * + * @return string Technorati account username + */ + public function getUsername() { + return $this->_username; + } + + /** + * Returns Technorati account description. + * + * @return string Technorati account description + */ + public function getDescription() { + return $this->_description; + } + + /** + * Returns Technorati account biography. + * + * @return string Technorati account biography + */ + public function getBio() { + return $this->_bio; + } + + /** + * Returns Technorati account thumbnail picture. + * + * @return null|Zend_Uri_Http Technorati account thumbnail picture + */ + public function getThumbnailPicture() { + return $this->_thumbnailPicture; + } + + + /** + * Sets author first name. + * + * @param string $input first Name input value + * @return Zend_Service_Technorati_Author $this instance + */ + public function setFirstName($input) { + $this->_firstName = (string) $input; + return $this; + } + + /** + * Sets author last name. + * + * @param string $input last Name input value + * @return Zend_Service_Technorati_Author $this instance + */ + public function setLastName($input) { + $this->_lastName = (string) $input; + return $this; + } + + /** + * Sets Technorati account username. + * + * @param string $input username input value + * @return Zend_Service_Technorati_Author $this instance + */ + public function setUsername($input) { + $this->_username = (string) $input; + return $this; + } + + /** + * Sets Technorati account biography. + * + * @param string $input biography input value + * @return Zend_Service_Technorati_Author $this instance + */ + public function setBio($input) { + $this->_bio = (string) $input; + return $this; + } + + /** + * Sets Technorati account description. + * + * @param string $input description input value + * @return Zend_Service_Technorati_Author $this instance + */ + public function setDescription($input) { + $this->_description = (string) $input; + return $this; + } + + /** + * Sets Technorati account thumbnail picture. + * + * @param string|Zend_Uri_Http $input thumbnail picture URI + * @return Zend_Service_Technorati_Author $this instance + * @throws Zend_Service_Technorati_Exception if $input is an invalid URI + * (via Zend_Service_Technorati_Utils::normalizeUriHttp) + */ + public function setThumbnailPicture($input) { + $this->_thumbnailPicture = Zend_Service_Technorati_Utils::normalizeUriHttp($input); + return $this; + } + +}