diff -r bd595ad770fc -r 1c2f13fd785c web/enmi/Zend/Service/Simpy/LinkSet.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/enmi/Zend/Service/Simpy/LinkSet.php Thu Jan 20 19:30:54 2011 +0100 @@ -0,0 +1,83 @@ +query('//links/link'); + $this->_links = array(); + + for ($x = 0; $x < $list->length; $x++) { + $this->_links[$x] = new Zend_Service_Simpy_Link($list->item($x)); + } + } + + /** + * Returns an iterator for the link set + * + * @return ArrayIterator + */ + public function getIterator() + { + return new ArrayIterator($this->_links); + } + + /** + * Returns the number of links in the set + * + * @return int + */ + public function getLength() + { + return count($this->_links); + } +}