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