registerAllNamespaces(Zend_Gdata_Books::$namespaces); parent::__construct(); $this->_value = $value; } /** * Retrieves DOMElement which corresponds to this element and all * child properties. This is used to build this object back into a DOM * and eventually XML text for sending to the server upon updates, or * for application storage/persistance. * * @param DOMDocument $doc The DOMDocument used to construct DOMElements * @return DOMElement The DOMElement representing this element and all * child properties. */ public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) { $element = parent::getDOM($doc); if ($this->_value !== null) { $element->setAttribute('value', $this->_value); } return $element; } /** * Extracts XML attributes from the DOM and converts them to the * appropriate object members. * * @param DOMNode $attribute The DOMNode attribute to be handled. */ protected function takeAttributeFromDOM($attribute) { switch ($attribute->localName) { case 'value': $this->_value = $attribute->nodeValue; break; default: parent::takeAttributeFromDOM($attribute); } } /** * Returns the programmatic value that describes the embeddability of a * volume in Google Book Search * * @return string|null The value */ public function getValue() { return $this->_value; } /** * Sets the programmatic value that describes the embeddability of a * volume in Google Book Search * * @param string|null $value Programmatic value that describes the * embeddability of a volume in Google Book Search * @return Zend_Gdata_Books_Extension_Embeddability Provides a fluent * interface */ public function setValue($value) { $this->_value = $value; return $this; } }