Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Extension/Who.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/Extension.php';
00028 
00032 require_once 'Zend/Gdata/Extension/AttendeeStatus.php';
00033 
00037 require_once 'Zend/Gdata/Extension/AttendeeType.php';
00038 
00042 require_once 'Zend/Gdata/Extension/EntryLink.php';
00043 
00053 class Zend_Gdata_Extension_Who extends Zend_Gdata_Extension
00054 {
00055 
00056     protected $_rootElement = 'who';
00057     protected $_email = null;
00058     protected $_rel = null;
00059     protected $_valueString = null;
00060     protected $_attendeeStatus = null;
00061     protected $_attendeeType = null;
00062     protected $_entryLink = null;
00063 
00073     public function __construct($email = null, $rel = null, $valueString = null,
00074         $attendeeStatus = null, $attendeeType = null, $entryLink = null)
00075     {
00076         parent::__construct();
00077         $this->_email = $email;
00078         $this->_rel = $rel;
00079         $this->_valueString = $valueString;
00080         $this->_attendeeStatus = $attendeeStatus;
00081         $this->_attendeeType = $attendeeType;
00082         $this->_entryLink = $entryLink;
00083     }
00084 
00095     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00096     {
00097         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00098         if ($this->_email !== null) {
00099             $element->setAttribute('email', $this->_email);
00100         }
00101         if ($this->_rel !== null) {
00102             $element->setAttribute('rel', $this->_rel);
00103         }
00104         if ($this->_valueString !== null) {
00105             $element->setAttribute('valueString', $this->_valueString);
00106         }
00107         if ($this->_attendeeStatus !== null) {
00108             $element->appendChild($this->_attendeeStatus->getDOM($element->ownerDocument));
00109         }
00110         if ($this->_attendeeType !== null) {
00111             $element->appendChild($this->_attendeeType->getDOM($element->ownerDocument));
00112         }
00113         if ($this->_entryLink !== null) {
00114             $element->appendChild($this->_entryLink->getDOM($element->ownerDocument));
00115         }
00116         return $element;
00117     }
00118 
00126     protected function takeAttributeFromDOM($attribute)
00127     {
00128         switch ($attribute->localName) {
00129         case 'email':
00130             $this->_email = $attribute->nodeValue;
00131             break;
00132         case 'rel':
00133             $this->_rel = $attribute->nodeValue;
00134             break;
00135         case 'valueString':
00136             $this->_valueString = $attribute->nodeValue;
00137             break;
00138         default:
00139             parent::takeAttributeFromDOM($attribute);
00140         }
00141     }
00142 
00149     protected function takeChildFromDOM($child)
00150     {
00151         $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
00152         switch ($absoluteNodeName) {
00153         case $this->lookupNamespace('gd') . ':' . 'attendeeStatus':
00154             $attendeeStatus = new Zend_Gdata_Extension_AttendeeStatus();
00155             $attendeeStatus->transferFromDOM($child);
00156             $this->_attendeeStatus = $attendeeStatus;
00157             break;
00158         case $this->lookupNamespace('gd') . ':' . 'attendeeType':
00159             $attendeeType = new Zend_Gdata_Extension_AttendeeType();
00160             $attendeeType->transferFromDOM($child);
00161             $this->_attendeeType = $attendeeType;
00162             break;
00163         case $this->lookupNamespace('gd') . ':' . 'entryLink':
00164             $entryLink = new Zend_Gdata_Extension_EntryLink();
00165             $entryLink->transferFromDOM($child);
00166             $this->_entryLink = $entryLink;
00167             break;
00168         default:
00169             parent::takeChildFromDOM($child);
00170             break;
00171         }
00172     }
00173 
00179     public function __toString()
00180     {
00181         if ($this->_valueString != null) {
00182             return $this->_valueString;
00183         }
00184         else {
00185             return parent::__toString();
00186         }
00187     }
00188 
00194     public function getValueString()
00195     {
00196         return $this->_valueString;
00197     }
00198 
00205     public function setValueString($value)
00206     {
00207         $this->_valueString = $value;
00208         return $this;
00209     }
00210 
00216     public function getEmail()
00217     {
00218         return $this->_email;
00219     }
00220 
00227     public function setEmail($value)
00228     {
00229         $this->_email = $value;
00230         return $this;
00231     }
00232 
00238     public function getRel()
00239     {
00240         return $this->_rel;
00241     }
00242 
00249     public function setRel($value)
00250     {
00251         $this->_rel = $value;
00252         return $this;
00253     }
00254 
00260     public function getAttendeeStatus()
00261     {
00262         return $this->_attendeeStatus;
00263     }
00264 
00271     public function setAttendeeStatus($value)
00272     {
00273         $this->_attendeeStatus = $value;
00274         return $this;
00275     }
00276 
00282     public function getAttendeeType()
00283     {
00284         return $this->_attendeeType;
00285     }
00286 
00293     public function setAttendeeType($value)
00294     {
00295         $this->_attendeeType = $value;
00296         return $this;
00297     }
00298 
00299 }
 All Data Structures Namespaces Files Functions Variables Enumerations