|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00032 class Zend_Service_Simpy_Link 00033 { 00039 const ACCESSTYPE_PRIVATE = '0'; 00040 00046 const ACCESSTYPE_PUBLIC = '1'; 00047 00053 protected $_accessType; 00054 00060 protected $_url; 00061 00067 protected $_modDate; 00068 00074 protected $_addDate; 00075 00081 protected $_title; 00082 00088 protected $_nickname; 00089 00095 protected $_tags; 00096 00102 protected $_note; 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->_url = $xpath->evaluate('/link/url')->item(0)->nodeValue; 00120 $this->_modDate = $xpath->evaluate('/link/modDate')->item(0)->nodeValue; 00121 $this->_addDate = $xpath->evaluate('/link/addDate')->item(0)->nodeValue; 00122 $this->_title = $xpath->evaluate('/link/title')->item(0)->nodeValue; 00123 $this->_nickname = $xpath->evaluate('/link/nickname')->item(0)->nodeValue; 00124 $this->_note = $xpath->evaluate('/link/note')->item(0)->nodeValue; 00125 00126 $list = $xpath->query('/link/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 getUrl() 00152 { 00153 return $this->_url; 00154 } 00155 00161 public function getModDate() 00162 { 00163 return $this->_modDate; 00164 } 00165 00171 public function getAddDate() 00172 { 00173 return $this->_addDate; 00174 } 00175 00181 public function getTitle() 00182 { 00183 return $this->_title; 00184 } 00185 00191 public function getNickname() 00192 { 00193 return $this->_nickname; 00194 } 00195 00201 public function getTags() 00202 { 00203 return $this->_tags; 00204 } 00205 00211 public function getNote() 00212 { 00213 return $this->_note; 00214 } 00215 }