|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00028 require_once 'Zend/Service/Simpy/Tag.php'; 00029 00030 00038 class Zend_Service_Simpy_TagSet implements IteratorAggregate 00039 { 00045 protected $_tags; 00046 00053 public function __construct(DOMDocument $doc) 00054 { 00055 $xpath = new DOMXPath($doc); 00056 $list = $xpath->query('//tags/tag'); 00057 $this->_tags = array(); 00058 00059 for ($x = 0; $x < $list->length; $x++) { 00060 $this->_tags[$x] = new Zend_Service_Simpy_Tag($list->item($x)); 00061 } 00062 } 00063 00069 public function getIterator() 00070 { 00071 return new ArrayIterator($this->_tags); 00072 } 00073 00079 public function getLength() 00080 { 00081 return count($this->_tags); 00082 } 00083 }