_xpath->query('/tapi/document/result/days/text()'); if ($result->length == 1) $this->_days = (int) $result->item(0)->data; $result = $this->_xpath->query('/tapi/document/result/searchurl/text()'); if ($result->length == 1) { $this->_searchUrl = Zend_Service_Technorati_Utils::normalizeUriHttp($result->item(0)->data); } $this->_totalResultsReturned = (int) $this->_xpath->evaluate("count(/tapi/document/items/item)"); $this->_totalResultsAvailable = (int) $this->getDays(); } /** * Returns the search URL for given query. * * @return Zend_Uri_Http */ public function getSearchUrl() { return $this->_searchUrl; } /** * Returns the number of days for which counts provided. * * @return int */ public function getDays() { return $this->_days; } /** * Implements Zend_Service_Technorati_ResultSet::current(). * * @return Zend_Service_Technorati_DailyCountsResult current result */ public function current() { /** * @see Zend_Service_Technorati_DailyCountsResult */ #require_once 'Zend/Service/Technorati/DailyCountsResult.php'; return new Zend_Service_Technorati_DailyCountsResult($this->_results->item($this->_currentIndex)); } }