diff -r 000000000000 -r 4eba9c11703f web/Zend/Service/Simpy/LinkSet.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/Zend/Service/Simpy/LinkSet.php Mon Dec 13 18:29:26 2010 +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); + } +}