Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Gapps/Extension/Nickname.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/Extension.php';
00028 
00032 require_once 'Zend/Gdata/Gapps.php';
00033 
00045 class Zend_Gdata_Gapps_Extension_Nickname extends Zend_Gdata_Extension
00046 {
00047 
00048     protected $_rootNamespace = 'apps';
00049     protected $_rootElement = 'nickname';
00050 
00057     protected $_name = null;
00058 
00063     public function __construct($name = null)
00064     {
00065         $this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces);
00066         parent::__construct();
00067         $this->_name = $name;
00068     }
00069 
00080     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00081     {
00082         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00083         if ($this->_name !== null) {
00084             $element->setAttribute('name', $this->_name);
00085         }
00086         return $element;
00087     }
00088 
00096     protected function takeAttributeFromDOM($attribute)
00097     {
00098         switch ($attribute->localName) {
00099         case 'name':
00100             $this->_name = $attribute->nodeValue;
00101             break;
00102         default:
00103             parent::takeAttributeFromDOM($attribute);
00104         }
00105     }
00106 
00113     public function getName()
00114     {
00115         return $this->_name;
00116     }
00117 
00127     public function setName($value)
00128     {
00129         $this->_name = $value;
00130         return $this;
00131     }
00132 
00137     public function __toString()
00138     {
00139         return $this->getName();
00140     }
00141 
00142 }
 All Data Structures Namespaces Files Functions Variables Enumerations