|
Moodle
2.2.1
http://www.collinsharper.com
|
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_EmailList extends Zend_Gdata_Extension 00046 { 00047 00048 protected $_rootNamespace = 'apps'; 00049 protected $_rootElement = 'emailList'; 00050 00057 protected $_name = null; 00058 00064 public function __construct($name = null) 00065 { 00066 $this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces); 00067 parent::__construct(); 00068 $this->_name = $name; 00069 } 00070 00081 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 00082 { 00083 $element = parent::getDOM($doc, $majorVersion, $minorVersion); 00084 if ($this->_name !== null) { 00085 $element->setAttribute('name', $this->_name); 00086 } 00087 return $element; 00088 } 00089 00097 protected function takeAttributeFromDOM($attribute) 00098 { 00099 switch ($attribute->localName) { 00100 case 'name': 00101 $this->_name = $attribute->nodeValue; 00102 break; 00103 default: 00104 parent::takeAttributeFromDOM($attribute); 00105 } 00106 } 00107 00114 public function getName() 00115 { 00116 return $this->_name; 00117 } 00118 00127 public function setName($value) 00128 { 00129 $this->_name = $value; 00130 return $this; 00131 } 00132 00139 public function __toString() 00140 { 00141 return $this->getName(); 00142 } 00143 00144 }