From 06f945f27840b53e57795dadbc38e76f7e11ab1c Mon Sep 17 00:00:00 2001 From: Horus3 Date: Mon, 24 Feb 2014 16:42:14 +0100 Subject: init --- .../Zend/Gdata/Books/Extension/AnnotationLink.php | 63 +++++++++ .../Zend/Gdata/Books/Extension/BooksCategory.php | 59 ++++++++ .../Zend/Gdata/Books/Extension/BooksLink.php | 61 +++++++++ .../Zend/Gdata/Books/Extension/Embeddability.php | 122 +++++++++++++++++ .../Zend/Gdata/Books/Extension/InfoLink.php | 59 ++++++++ .../Zend/Gdata/Books/Extension/PreviewLink.php | 60 ++++++++ zend/library/Zend/Gdata/Books/Extension/Review.php | 152 +++++++++++++++++++++ .../Zend/Gdata/Books/Extension/ThumbnailLink.php | 60 ++++++++ .../Zend/Gdata/Books/Extension/Viewability.php | 123 +++++++++++++++++ 9 files changed, 759 insertions(+) create mode 100644 zend/library/Zend/Gdata/Books/Extension/AnnotationLink.php create mode 100644 zend/library/Zend/Gdata/Books/Extension/BooksCategory.php create mode 100644 zend/library/Zend/Gdata/Books/Extension/BooksLink.php create mode 100644 zend/library/Zend/Gdata/Books/Extension/Embeddability.php create mode 100644 zend/library/Zend/Gdata/Books/Extension/InfoLink.php create mode 100644 zend/library/Zend/Gdata/Books/Extension/PreviewLink.php create mode 100644 zend/library/Zend/Gdata/Books/Extension/Review.php create mode 100644 zend/library/Zend/Gdata/Books/Extension/ThumbnailLink.php create mode 100644 zend/library/Zend/Gdata/Books/Extension/Viewability.php (limited to 'zend/library/Zend/Gdata/Books/Extension') diff --git a/zend/library/Zend/Gdata/Books/Extension/AnnotationLink.php b/zend/library/Zend/Gdata/Books/Extension/AnnotationLink.php new file mode 100644 index 0000000..8c4f530 --- /dev/null +++ b/zend/library/Zend/Gdata/Books/Extension/AnnotationLink.php @@ -0,0 +1,63 @@ +registerAllNamespaces(Zend_Gdata_Books::$namespaces); + parent::__construct($href, $rel, $type, $hrefLang, $title, $length); + } + +} + diff --git a/zend/library/Zend/Gdata/Books/Extension/BooksCategory.php b/zend/library/Zend/Gdata/Books/Extension/BooksCategory.php new file mode 100644 index 0000000..3520e9a --- /dev/null +++ b/zend/library/Zend/Gdata/Books/Extension/BooksCategory.php @@ -0,0 +1,59 @@ +registerAllNamespaces(Zend_Gdata_Books::$namespaces); + parent::__construct($term, $scheme, $label); + } + +} diff --git a/zend/library/Zend/Gdata/Books/Extension/BooksLink.php b/zend/library/Zend/Gdata/Books/Extension/BooksLink.php new file mode 100644 index 0000000..32ca572 --- /dev/null +++ b/zend/library/Zend/Gdata/Books/Extension/BooksLink.php @@ -0,0 +1,61 @@ +registerAllNamespaces(Zend_Gdata_Books::$namespaces); + parent::__construct($href, $rel, $type, $hrefLang, $title, $length); + } + + +} + diff --git a/zend/library/Zend/Gdata/Books/Extension/Embeddability.php b/zend/library/Zend/Gdata/Books/Extension/Embeddability.php new file mode 100644 index 0000000..b8a8e7b --- /dev/null +++ b/zend/library/Zend/Gdata/Books/Extension/Embeddability.php @@ -0,0 +1,122 @@ +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; + } + +} + diff --git a/zend/library/Zend/Gdata/Books/Extension/InfoLink.php b/zend/library/Zend/Gdata/Books/Extension/InfoLink.php new file mode 100644 index 0000000..8cc911f --- /dev/null +++ b/zend/library/Zend/Gdata/Books/Extension/InfoLink.php @@ -0,0 +1,59 @@ +registerAllNamespaces(Zend_Gdata_Books::$namespaces); + parent::__construct($href, $rel, $type, $hrefLang, $title, $length); + } + +} diff --git a/zend/library/Zend/Gdata/Books/Extension/PreviewLink.php b/zend/library/Zend/Gdata/Books/Extension/PreviewLink.php new file mode 100644 index 0000000..a5cb107 --- /dev/null +++ b/zend/library/Zend/Gdata/Books/Extension/PreviewLink.php @@ -0,0 +1,60 @@ +registerAllNamespaces(Zend_Gdata_Books::$namespaces); + parent::__construct($href, $rel, $type, $hrefLang, $title, $length); + } + +} diff --git a/zend/library/Zend/Gdata/Books/Extension/Review.php b/zend/library/Zend/Gdata/Books/Extension/Review.php new file mode 100644 index 0000000..04e31d5 --- /dev/null +++ b/zend/library/Zend/Gdata/Books/Extension/Review.php @@ -0,0 +1,152 @@ +registerAllNamespaces(Zend_Gdata_Books::$namespaces); + parent::__construct(); + $this->_lang = $lang; + $this->_type = $type; + $this->_text = $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->_lang !== null) { + $element->setAttribute('lang', $this->_lang); + } + if ($this->_type !== null) { + $element->setAttribute('type', $this->_type); + } + 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 'lang': + $this->_lang = $attribute->nodeValue; + break; + case 'type': + $this->_type = $attribute->nodeValue; + break; + default: + parent::takeAttributeFromDOM($attribute); + } + } + + /** + * Returns the language of link title + * + * @return string The lang + */ + public function getLang() + { + return $this->_lang; + } + + /** + * Returns the type of text construct (typically 'text', 'html' or 'xhtml') + * + * @return string The type + */ + public function getType() + { + return $this->_type; + } + + /** + * Sets the language of link title + * + * @param string $lang language of link title + * @return Zend_Gdata_Books_Extension_Review Provides a fluent interface + */ + public function setLang($lang) + { + $this->_lang = $lang; + return $this; + } + + /** + * Sets the type of text construct (typically 'text', 'html' or 'xhtml') + * + * @param string $type type of text construct (typically 'text', 'html' or 'xhtml') + * @return Zend_Gdata_Books_Extension_Review Provides a fluent interface + */ + public function setType($type) + { + $this->_type = $type; + return $this; + } + + +} + diff --git a/zend/library/Zend/Gdata/Books/Extension/ThumbnailLink.php b/zend/library/Zend/Gdata/Books/Extension/ThumbnailLink.php new file mode 100644 index 0000000..3012788 --- /dev/null +++ b/zend/library/Zend/Gdata/Books/Extension/ThumbnailLink.php @@ -0,0 +1,60 @@ +registerAllNamespaces(Zend_Gdata_Books::$namespaces); + parent::__construct($href, $rel, $type, $hrefLang, $title, $length); + } + +} diff --git a/zend/library/Zend/Gdata/Books/Extension/Viewability.php b/zend/library/Zend/Gdata/Books/Extension/Viewability.php new file mode 100644 index 0000000..bd4a16c --- /dev/null +++ b/zend/library/Zend/Gdata/Books/Extension/Viewability.php @@ -0,0 +1,123 @@ +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 viewability of a volume + * in Google Book Search + * + * @return string The value + */ + public function getValue() + { + return $this->_value; + } + + /** + * Sets the programmatic value that describes the viewability of a volume in + * Google Book Search + * + * @param string $value programmatic value that describes the viewability + * of a volume in Googl eBook Search + * @return Zend_Gdata_Books_Extension_Viewability Provides a fluent + * interface + */ + public function setValue($value) + { + $this->_value = $value; + return $this; + } + + +} + -- cgit v1.2.3