Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Service/Simpy/Note.php
Go to the documentation of this file.
00001 <?php
00002 
00032 class Zend_Service_Simpy_Note
00033 {
00039     const ACCESSTYPE_PRIVATE = 'private';
00040 
00046     const ACCESSTYPE_PUBLIC  = 'public';
00047 
00053     protected $_accessType;
00054 
00060     protected $_id;
00061 
00067     protected $_uri;
00068 
00074     protected $_modDate;
00075 
00081     protected $_addDate;
00082 
00088     protected $_title;
00089 
00095     protected $_tags;
00096 
00102     protected $_description;
00103 
00111     public function __construct($node)
00112     {
00113         $this->_accessType = $node->attributes->getNamedItem('accessType')->nodeValue;
00114 
00115         $doc = new DOMDocument();
00116         $doc->appendChild($doc->importNode($node, true));
00117         $xpath = new DOMXPath($doc);
00118 
00119         $this->_uri = $xpath->evaluate('/note/uri')->item(0)->nodeValue;
00120         $this->_id = substr($this->_uri, strrpos($this->_uri, '=') + 1);
00121         $this->_modDate = trim($xpath->evaluate('/note/modDate')->item(0)->nodeValue);
00122         $this->_addDate = trim($xpath->evaluate('/note/addDate')->item(0)->nodeValue);
00123         $this->_title = $xpath->evaluate('/note/title')->item(0)->nodeValue;
00124         $this->_description = $xpath->evaluate('/note/description')->item(0)->nodeValue;
00125 
00126         $list = $xpath->query('/note/tags/tag');
00127         $this->_tags = array();
00128 
00129         for ($x = 0; $x < $list->length; $x++) {
00130             $this->_tags[$x] = $list->item($x)->nodeValue;
00131         }
00132     }
00133 
00141     public function getAccessType()
00142     {
00143         return $this->_accessType;
00144     }
00145 
00151     public function getId()
00152     {
00153         return $this->_id;
00154     }
00155 
00161     public function getUri()
00162     {
00163         return $this->_uri;
00164     }
00165 
00171     public function getModDate()
00172     {
00173         return $this->_modDate;
00174     }
00175 
00181     public function getAddDate()
00182     {
00183         return $this->_addDate;
00184     }
00185 
00191     public function getTitle()
00192     {
00193         return $this->_title;
00194     }
00195 
00201     public function getTags()
00202     {
00203         return $this->_tags;
00204     }
00205 
00211     public function getDescription()
00212     {
00213         return $this->_description;
00214     }
00215 }
 All Data Structures Namespaces Files Functions Variables Enumerations