Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/App/Extension/Person.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/App/Extension.php';
00028 
00032 require_once 'Zend/Gdata/App/Extension/Name.php';
00033 
00037 require_once 'Zend/Gdata/App/Extension/Email.php';
00038 
00042 require_once 'Zend/Gdata/App/Extension/Uri.php';
00043 
00053 abstract class Zend_Gdata_App_Extension_Person extends Zend_Gdata_App_Extension
00054 {
00055 
00056     protected $_rootElement = null;
00057     protected $_name = null;
00058     protected $_email = null;
00059     protected $_uri = null;
00060 
00061     public function __construct($name = null, $email = null, $uri = null)
00062     {
00063         parent::__construct();
00064         $this->_name = $name;
00065         $this->_email = $email;
00066         $this->_uri = $uri;
00067     }
00068 
00069     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00070     {
00071         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00072         if ($this->_name != null) {
00073             $element->appendChild($this->_name->getDOM($element->ownerDocument));
00074         }
00075         if ($this->_email != null) {
00076             $element->appendChild($this->_email->getDOM($element->ownerDocument));
00077         }
00078         if ($this->_uri != null) {
00079             $element->appendChild($this->_uri->getDOM($element->ownerDocument));
00080         }
00081         return $element;
00082     }
00083 
00084     protected function takeChildFromDOM($child)
00085     {
00086         $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
00087         switch ($absoluteNodeName) {
00088         case $this->lookupNamespace('atom') . ':' . 'name':
00089             $name = new Zend_Gdata_App_Extension_Name();
00090             $name->transferFromDOM($child);
00091             $this->_name = $name;
00092             break;
00093         case $this->lookupNamespace('atom') . ':' . 'email':
00094             $email = new Zend_Gdata_App_Extension_Email();
00095             $email->transferFromDOM($child);
00096             $this->_email = $email;
00097             break;
00098         case $this->lookupNamespace('atom') . ':' . 'uri':
00099             $uri = new Zend_Gdata_App_Extension_Uri();
00100             $uri->transferFromDOM($child);
00101             $this->_uri = $uri;
00102             break;
00103         default:
00104             parent::takeChildFromDOM($child);
00105             break;
00106         }
00107     }
00108 
00112     public function getName()
00113     {
00114         return $this->_name;
00115     }
00116 
00121     public function setName($value)
00122     {
00123         $this->_name = $value;
00124         return $this;
00125     }
00126 
00130     public function getEmail()
00131     {
00132         return $this->_email;
00133     }
00134 
00139     public function setEmail($value)
00140     {
00141         $this->_email = $value;
00142         return $this;
00143     }
00144 
00148     public function getUri()
00149     {
00150         return $this->_uri;
00151     }
00152 
00157     public function setUri($value)
00158     {
00159         $this->_uri = $value;
00160         return $this;
00161     }
00162 
00163 }
 All Data Structures Namespaces Files Functions Variables Enumerations