diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Service/Technorati/KeyInfoResult.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Service/Technorati/KeyInfoResult.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,118 @@ +_dom = $dom; + // $this->_xpath = new DOMXPath($dom); + $xpath = new DOMXPath($dom); + + $this->_apiQueries = (int) $xpath->query('/tapi/document/result/apiqueries/text()')->item(0)->data; + $this->_maxQueries = (int) $xpath->query('/tapi/document/result/maxqueries/text()')->item(0)->data; + $this->setApiKey($apiKey); + } + + + /** + * Returns API Key string. + * + * @return string API Key string + */ + public function getApiKey() { + return $this->_apiKey; + } + + /** + * Returns the number of queries sent today. + * + * @return int number of queries sent today + */ + public function getApiQueries() { + return $this->_apiQueries; + } + + /** + * Returns Key's daily query limit. + * + * @return int maximum number of available queries per day + */ + public function getMaxQueries() { + return $this->_maxQueries; + } + + + /** + * Sets API Key string. + * + * @param string $apiKey the API Key + * @return Zend_Service_Technorati_KeyInfoResult $this instance + */ + public function setApiKey($apiKey) { + $this->_apiKey = $apiKey; + return $this; + } +}