Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Service/Simpy/WatchlistSet.php
Go to the documentation of this file.
00001 <?php
00002 
00028 require_once 'Zend/Service/Simpy/Watchlist.php';
00029 
00030 
00038 class Zend_Service_Simpy_WatchlistSet implements IteratorAggregate
00039 {
00045     protected $_watchlists = array();
00046 
00053     public function __construct(DOMDocument $doc)
00054     {
00055         $xpath = new DOMXPath($doc);
00056         $list = $xpath->query('//watchlists/watchlist');
00057 
00058         for ($x = 0; $x < $list->length; $x++) {
00059             $this->_watchlists[$x] = new Zend_Service_Simpy_Watchlist($list->item($x));
00060         }
00061     }
00062 
00068     public function getIterator()
00069     {
00070         return new ArrayIterator($this->_watchlists);
00071     }
00072 
00078     public function getLength()
00079     {
00080         return count($this->_watchlists);
00081     }
00082 }
 All Data Structures Namespaces Files Functions Variables Enumerations