|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00027 require_once 'Zend/Service/Technorati/ResultSet.php'; 00028 00029 00039 class Zend_Service_Technorati_TagResultSet extends Zend_Service_Technorati_ResultSet 00040 { 00047 protected $_postsMatched; 00048 00055 protected $_blogsMatched; 00056 00063 public function __construct(DomDocument $dom, $options = array()) 00064 { 00065 parent::__construct($dom, $options); 00066 00067 $result = $this->_xpath->query('/tapi/document/result/postsmatched/text()'); 00068 if ($result->length == 1) $this->_postsMatched = (int) $result->item(0)->data; 00069 00070 $result = $this->_xpath->query('/tapi/document/result/blogsmatched/text()'); 00071 if ($result->length == 1) $this->_blogsMatched = (int) $result->item(0)->data; 00072 00073 $this->_totalResultsReturned = (int) $this->_xpath->evaluate("count(/tapi/document/item)"); 00075 $this->_totalResultsAvailable = (int) $this->getPostsMatched(); 00076 } 00077 00078 00084 public function getPostsMatched() { 00085 return $this->_postsMatched; 00086 } 00087 00093 public function getBlogsMatched() { 00094 return $this->_blogsMatched; 00095 } 00096 00102 public function current() 00103 { 00107 require_once 'Zend/Service/Technorati/TagResult.php'; 00108 return new Zend_Service_Technorati_TagResult($this->_results->item($this->_currentIndex)); 00109 } 00110 }