|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00028 require_once 'Zend/Service/Simpy/WatchlistFilterSet.php'; 00029 00030 00038 class Zend_Service_Simpy_Watchlist 00039 { 00045 protected $_id; 00046 00052 protected $_name; 00053 00059 protected $_description; 00060 00066 protected $_addDate; 00067 00073 protected $_newLinks; 00074 00080 protected $_users; 00081 00087 protected $_filters; 00088 00097 public function __construct($node) 00098 { 00099 $map =& $node->attributes; 00100 00101 $this->_id = $map->getNamedItem('id')->nodeValue; 00102 $this->_name = $map->getNamedItem('name')->nodeValue; 00103 $this->_description = $map->getNamedItem('description')->nodeValue; 00104 $this->_addDate = $map->getNamedItem('addDate')->nodeValue; 00105 $this->_newLinks = $map->getNamedItem('newLinks')->nodeValue; 00106 00107 $this->_users = array(); 00108 $this->_filters = new Zend_Service_Simpy_WatchlistFilterSet(); 00109 00110 $childNode = $node->firstChild; 00111 while ($childNode !== null) { 00112 if ($childNode->nodeName == 'user') { 00113 $this->_users[] = $childNode->attributes->getNamedItem('username')->nodeValue; 00114 } elseif ($childNode->nodeName == 'filter') { 00115 $filter = new Zend_Service_Simpy_WatchlistFilter($childNode); 00116 $this->_filters->add($filter); 00117 } 00118 $childNode = $childNode->nextSibling; 00119 } 00120 } 00121 00127 public function getId() 00128 { 00129 return $this->_id; 00130 } 00131 00137 public function getName() 00138 { 00139 return $this->_name; 00140 } 00141 00147 public function getDescription() 00148 { 00149 return $this->_description; 00150 } 00151 00157 public function getAddDate() 00158 { 00159 return $this->_addDate; 00160 } 00161 00167 public function getNewLinks() 00168 { 00169 return $this->_newLinks; 00170 } 00171 00177 public function getUsers() 00178 { 00179 return $this->_users; 00180 } 00181 00187 public function getFilters() 00188 { 00189 return $this->_filters; 00190 } 00191 }