|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00027 require_once 'Zend/Gdata/Extension.php'; 00028 00038 class Zend_Gdata_Extension_EventStatus extends Zend_Gdata_Extension 00039 { 00040 00041 protected $_rootElement = 'eventStatus'; 00042 protected $_value = null; 00043 00044 public function __construct($value = null) 00045 { 00046 parent::__construct(); 00047 $this->_value = $value; 00048 } 00049 00050 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 00051 { 00052 $element = parent::getDOM($doc, $majorVersion, $minorVersion); 00053 if ($this->_value !== null) { 00054 $element->setAttribute('value', $this->_value); 00055 } 00056 return $element; 00057 } 00058 00059 protected function takeAttributeFromDOM($attribute) 00060 { 00061 switch ($attribute->localName) { 00062 case 'value': 00063 $this->_value = $attribute->nodeValue; 00064 break; 00065 default: 00066 parent::takeAttributeFromDOM($attribute); 00067 } 00068 } 00069 00075 public function getValue() 00076 { 00077 return $this->_value; 00078 } 00079 00086 public function setValue($value) 00087 { 00088 $this->_value = $value; 00089 return $this; 00090 } 00091 00096 public function __toString() 00097 { 00098 return $this->getValue(); 00099 } 00100 00101 }