|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00027 require_once 'Zend/Service/Technorati/Utils.php'; 00028 00029 00039 class Zend_Service_Technorati_Author 00040 { 00047 protected $_firstName; 00048 00055 protected $_lastName; 00056 00063 protected $_username; 00064 00071 protected $_description; 00072 00079 protected $_bio; 00080 00087 protected $_thumbnailPicture; 00088 00089 00095 public function __construct(DomElement $dom) 00096 { 00097 $xpath = new DOMXPath($dom->ownerDocument); 00098 00099 $result = $xpath->query('./firstname/text()', $dom); 00100 if ($result->length == 1) $this->setFirstName($result->item(0)->data); 00101 00102 $result = $xpath->query('./lastname/text()', $dom); 00103 if ($result->length == 1) $this->setLastName($result->item(0)->data); 00104 00105 $result = $xpath->query('./username/text()', $dom); 00106 if ($result->length == 1) $this->setUsername($result->item(0)->data); 00107 00108 $result = $xpath->query('./description/text()', $dom); 00109 if ($result->length == 1) $this->setDescription($result->item(0)->data); 00110 00111 $result = $xpath->query('./bio/text()', $dom); 00112 if ($result->length == 1) $this->setBio($result->item(0)->data); 00113 00114 $result = $xpath->query('./thumbnailpicture/text()', $dom); 00115 if ($result->length == 1) $this->setThumbnailPicture($result->item(0)->data); 00116 } 00117 00118 00124 public function getFirstName() { 00125 return $this->_firstName; 00126 } 00127 00133 public function getLastName() { 00134 return $this->_lastName; 00135 } 00136 00142 public function getUsername() { 00143 return $this->_username; 00144 } 00145 00151 public function getDescription() { 00152 return $this->_description; 00153 } 00154 00160 public function getBio() { 00161 return $this->_bio; 00162 } 00163 00169 public function getThumbnailPicture() { 00170 return $this->_thumbnailPicture; 00171 } 00172 00173 00180 public function setFirstName($input) { 00181 $this->_firstName = (string) $input; 00182 return $this; 00183 } 00184 00191 public function setLastName($input) { 00192 $this->_lastName = (string) $input; 00193 return $this; 00194 } 00195 00202 public function setUsername($input) { 00203 $this->_username = (string) $input; 00204 return $this; 00205 } 00206 00213 public function setBio($input) { 00214 $this->_bio = (string) $input; 00215 return $this; 00216 } 00217 00224 public function setDescription($input) { 00225 $this->_description = (string) $input; 00226 return $this; 00227 } 00228 00237 public function setThumbnailPicture($input) { 00238 $this->_thumbnailPicture = Zend_Service_Technorati_Utils::normalizeUriHttp($input); 00239 return $this; 00240 } 00241 00242 }