Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Gapps/EmailListEntry.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/EmailList.php';
00038 
00059 class Zend_Gdata_Gapps_EmailListEntry extends Zend_Gdata_Entry
00060 {
00061 
00062     protected $_entryClassName = 'Zend_Gdata_Gapps_EmailListEntry';
00063 
00070     protected $_emailList = null;
00071 
00078     protected $_feedLink = array();
00079 
00086     public function __construct($element = null)
00087     {
00088         $this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces);
00089         parent::__construct($element);
00090     }
00091 
00101     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00102     {
00103         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00104         if ($this->_emailList !== null) {
00105             $element->appendChild($this->_emailList->getDOM($element->ownerDocument));
00106         }
00107         foreach ($this->_feedLink as $feedLink) {
00108             $element->appendChild($feedLink->getDOM($element->ownerDocument));
00109         }
00110         return $element;
00111     }
00112 
00119     protected function takeChildFromDOM($child)
00120     {
00121         $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
00122 
00123         switch ($absoluteNodeName) {
00124             case $this->lookupNamespace('apps') . ':' . 'emailList';
00125                 $emailList = new Zend_Gdata_Gapps_Extension_EmailList();
00126                 $emailList->transferFromDOM($child);
00127                 $this->_emailList = $emailList;
00128                 break;
00129             case $this->lookupNamespace('gd') . ':' . 'feedLink';
00130                 $feedLink = new Zend_Gdata_Extension_FeedLink();
00131                 $feedLink->transferFromDOM($child);
00132                 $this->_feedLink[] = $feedLink;
00133                 break;
00134             default:
00135                 parent::takeChildFromDOM($child);
00136                 break;
00137         }
00138     }
00139 
00147     public function getEmailList()
00148     {
00149         return $this->_emailList;
00150     }
00151 
00163     public function setEmailList($value)
00164     {
00165         $this->_emailList = $value;
00166         return $this;
00167     }
00168 
00182     public function getFeedLink($rel = null)
00183     {
00184         if ($rel == null) {
00185             return $this->_feedLink;
00186         } else {
00187             foreach ($this->_feedLink as $feedLink) {
00188                 if ($feedLink->rel == $rel) {
00189                     return $feedLink;
00190                 }
00191             }
00192             return null;
00193         }
00194     }
00195 
00208     public function setFeedLink($value)
00209     {
00210         $this->_feedLink = $value;
00211         return $this;
00212     }
00213 
00214 }
 All Data Structures Namespaces Files Functions Variables Enumerations