|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00027 require_once 'Zend/Gdata/Extension.php'; 00028 00038 class Zend_Gdata_Books_Extension_Embeddability extends Zend_Gdata_Extension 00039 { 00040 00041 protected $_rootNamespace = 'gbs'; 00042 protected $_rootElement = 'embeddability'; 00043 protected $_value = null; 00044 00052 public function __construct($value = null) 00053 { 00054 $this->registerAllNamespaces(Zend_Gdata_Books::$namespaces); 00055 parent::__construct(); 00056 $this->_value = $value; 00057 } 00058 00069 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 00070 { 00071 $element = parent::getDOM($doc); 00072 if ($this->_value !== null) { 00073 $element->setAttribute('value', $this->_value); 00074 } 00075 return $element; 00076 } 00077 00084 protected function takeAttributeFromDOM($attribute) 00085 { 00086 switch ($attribute->localName) { 00087 case 'value': 00088 $this->_value = $attribute->nodeValue; 00089 break; 00090 default: 00091 parent::takeAttributeFromDOM($attribute); 00092 } 00093 } 00094 00101 public function getValue() 00102 { 00103 return $this->_value; 00104 } 00105 00115 public function setValue($value) 00116 { 00117 $this->_value = $value; 00118 return $this; 00119 } 00120 00121 } 00122