Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Gapps/UserEntry.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/Entry.php';
00028 
00032 require_once 'Zend/Gdata/Extension/FeedLink.php';
00033 
00037 require_once 'Zend/Gdata/Gapps/Extension/Login.php';
00038 
00042 require_once 'Zend/Gdata/Gapps/Extension/Name.php';
00043 
00047 require_once 'Zend/Gdata/Gapps/Extension/Quota.php';
00048 
00067 class Zend_Gdata_Gapps_UserEntry extends Zend_Gdata_Entry
00068 {
00069 
00070     protected $_entryClassName = 'Zend_Gdata_Gapps_UserEntry';
00071 
00078     protected $_login = null;
00079 
00085     protected $_name = null;
00086 
00093     protected $_quota = null;
00094 
00101     protected $_feedLink = array();
00102 
00109     public function __construct($element = null)
00110     {
00111         $this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces);
00112         parent::__construct($element);
00113     }
00114 
00124     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00125     {
00126         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00127         if ($this->_login !== null) {
00128             $element->appendChild($this->_login->getDOM($element->ownerDocument));
00129         }
00130         if ($this->_name !== null) {
00131             $element->appendChild($this->_name->getDOM($element->ownerDocument));
00132         }
00133         if ($this->_quota !== null) {
00134             $element->appendChild($this->_quota->getDOM($element->ownerDocument));
00135         }
00136         foreach ($this->_feedLink as $feedLink) {
00137             $element->appendChild($feedLink->getDOM($element->ownerDocument));
00138         }
00139         return $element;
00140     }
00141 
00148     protected function takeChildFromDOM($child)
00149     {
00150         $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
00151 
00152         switch ($absoluteNodeName) {
00153             case $this->lookupNamespace('apps') . ':' . 'login';
00154                 $login = new Zend_Gdata_Gapps_Extension_Login();
00155                 $login->transferFromDOM($child);
00156                 $this->_login = $login;
00157                 break;
00158             case $this->lookupNamespace('apps') . ':' . 'name';
00159                 $name = new Zend_Gdata_Gapps_Extension_Name();
00160                 $name->transferFromDOM($child);
00161                 $this->_name = $name;
00162                 break;
00163             case $this->lookupNamespace('apps') . ':' . 'quota';
00164                 $quota = new Zend_Gdata_Gapps_Extension_Quota();
00165                 $quota->transferFromDOM($child);
00166                 $this->_quota = $quota;
00167                 break;
00168             case $this->lookupNamespace('gd') . ':' . 'feedLink';
00169                 $feedLink = new Zend_Gdata_Extension_FeedLink();
00170                 $feedLink->transferFromDOM($child);
00171                 $this->_feedLink[] = $feedLink;
00172                 break;
00173             default:
00174                 parent::takeChildFromDOM($child);
00175                 break;
00176         }
00177     }
00178 
00185     public function getLogin()
00186     {
00187         return $this->_login;
00188     }
00189 
00198     public function setLogin($value)
00199     {
00200         $this->_login = $value;
00201         return $this;
00202     }
00203 
00210     public function getName()
00211     {
00212         return $this->_name;
00213     }
00214 
00223     public function setName($value)
00224     {
00225         $this->_name = $value;
00226         return $this;
00227     }
00228 
00235     public function getQuota()
00236     {
00237         return $this->_quota;
00238     }
00239 
00249     public function setQuota($value)
00250     {
00251         $this->_quota = $value;
00252         return $this;
00253     }
00254 
00267     public function getFeedLink($rel = null)
00268     {
00269         if ($rel == null) {
00270             return $this->_feedLink;
00271         } else {
00272             foreach ($this->_feedLink as $feedLink) {
00273                 if ($feedLink->rel == $rel) {
00274                     return $feedLink;
00275                 }
00276             }
00277             return null;
00278         }
00279     }
00280 
00289     public function setFeedLink($value)
00290     {
00291         $this->_feedLink = $value;
00292         return $this;
00293     }
00294 
00295 }
 All Data Structures Namespaces Files Functions Variables Enumerations