summaryrefslogtreecommitdiff
path: root/zend/library/Zend/Gdata/Books/Extension
diff options
context:
space:
mode:
Diffstat (limited to 'zend/library/Zend/Gdata/Books/Extension')
-rw-r--r--zend/library/Zend/Gdata/Books/Extension/AnnotationLink.php63
-rw-r--r--zend/library/Zend/Gdata/Books/Extension/BooksCategory.php59
-rw-r--r--zend/library/Zend/Gdata/Books/Extension/BooksLink.php61
-rw-r--r--zend/library/Zend/Gdata/Books/Extension/Embeddability.php122
-rw-r--r--zend/library/Zend/Gdata/Books/Extension/InfoLink.php59
-rw-r--r--zend/library/Zend/Gdata/Books/Extension/PreviewLink.php60
-rw-r--r--zend/library/Zend/Gdata/Books/Extension/Review.php152
-rw-r--r--zend/library/Zend/Gdata/Books/Extension/ThumbnailLink.php60
-rw-r--r--zend/library/Zend/Gdata/Books/Extension/Viewability.php123
9 files changed, 759 insertions, 0 deletions
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 @@
+<?php
+
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: AnnotationLink.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_Books_Extension_BooksLink
+ */
+require_once 'Zend/Gdata/Books/Extension/BooksLink.php';
+
+/**
+ * Describes an annotation link
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Books_Extension_AnnotationLink extends
+ Zend_Gdata_Books_Extension_BooksLink
+{
+
+ /**
+ * Constructor for Zend_Gdata_Books_Extension_AnnotationLink which
+ * Describes an annotation link
+ *
+ * @param string|null $href Linked resource URI
+ * @param string|null $rel Forward relationship
+ * @param string|null $type Resource MIME type
+ * @param string|null $hrefLang Resource language
+ * @param string|null $title Human-readable resource title
+ * @param string|null $length Resource length in octets
+ * @param DOMElement $element (optional) DOMElement from which this
+ * object should be constructed.
+ */
+ public function __construct($href = null, $rel = null, $type = null,
+ $hrefLang = null, $title = null, $length = null)
+ {
+ $this->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 @@
+<?php
+
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: BooksCategory.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_App_Extension_Category
+ */
+require_once 'Zend/Gdata/App/Extension/Category.php';
+
+/**
+ * Describes a books category
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Books_Extension_BooksCategory extends
+ Zend_Gdata_App_Extension_Category
+{
+
+ /**
+ * Constructor for Zend_Gdata_Books_Extension_BooksCategory which
+ * Describes a books category
+ *
+ * @param string|null $term An identifier representing the category within
+ * the categorization scheme.
+ * @param string|null $scheme A string containing a URI identifying the
+ * categorization scheme.
+ * @param string|null $label A human-readable label for display in
+ * end-user applications.
+ */
+ public function __construct($term = null, $scheme = null, $label = null)
+ {
+ $this->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 @@
+<?php
+
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: BooksLink.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_App_Extension_Link
+ */
+require_once 'Zend/Gdata/App/Extension/Link.php';
+
+/**
+ * Extends the base Link class with Books extensions
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Books_Extension_BooksLink extends Zend_Gdata_App_Extension_Link
+{
+
+ /**
+ * Constructor for Zend_Gdata_Books_Extension_BooksLink which
+ * Extends the base Link class with Books extensions
+ *
+ * @param string|null $href Linked resource URI
+ * @param string|null $rel Forward relationship
+ * @param string|null $type Resource MIME type
+ * @param string|null $hrefLang Resource language
+ * @param string|null $title Human-readable resource title
+ * @param string|null $length Resource length in octets
+ */
+ public function __construct($href = null, $rel = null, $type = null,
+ $hrefLang = null, $title = null, $length = null)
+ {
+ $this->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 @@
+<?php
+
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: Embeddability.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_Extension
+ */
+require_once 'Zend/Gdata/Extension.php';
+
+/**
+ * Describes an embeddability
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Books_Extension_Embeddability extends Zend_Gdata_Extension
+{
+
+ protected $_rootNamespace = 'gbs';
+ protected $_rootElement = 'embeddability';
+ protected $_value = null;
+
+ /**
+ * Constructor for Zend_Gdata_Books_Extension_Embeddability which
+ * Describes an embeddability.
+ *
+ * @param string|null $value A programmatic value representing the book's
+ * embeddability.
+ */
+ public function __construct($value = null)
+ {
+ $this->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 @@
+<?php
+
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: InfoLink.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_Books_Extension_BooksLink
+ */
+require_once 'Zend/Gdata/Books/Extension/BooksLink.php';
+
+/**
+ * Describes an info link
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Books_Extension_InfoLink extends
+ Zend_Gdata_Books_Extension_BooksLink
+{
+
+ /**
+ * Constructor for Zend_Gdata_Books_Extension_InfoLink which
+ * Describes an info link
+ *
+ * @param string|null $href Linked resource URI
+ * @param string|null $rel Forward relationship
+ * @param string|null $type Resource MIME type
+ * @param string|null $hrefLang Resource language
+ * @param string|null $title Human-readable resource title
+ * @param string|null $length Resource length in octets
+ */
+ public function __construct($href = null, $rel = null, $type = null,
+ $hrefLang = null, $title = null, $length = null)
+ {
+ $this->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 @@
+<?php
+
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: PreviewLink.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_Books_Extension_BooksLink
+ */
+require_once 'Zend/Gdata/Books/Extension/BooksLink.php';
+
+/**
+ * Describes a preview link
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Books_Extension_PreviewLink extends
+ Zend_Gdata_Books_Extension_BooksLink
+{
+
+ /**
+ * Constructor for Zend_Gdata_Books_Extension_PreviewLink which
+ * Describes a preview link
+ *
+ * @param string|null $href Linked resource URI
+ * @param string|null $rel Forward relationship
+ * @param string|null $type Resource MIME type
+ * @param string|null $hrefLang Resource language
+ * @param string|null $title Human-readable resource title
+ * @param string|null $length Resource length in octets
+ */
+ public function __construct($href = null, $rel = null, $type = null,
+ $hrefLang = null, $title = null, $length = null)
+ {
+ $this->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 @@
+<?php
+
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: Review.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_Extension
+ */
+require_once 'Zend/Gdata/Extension.php';
+
+/**
+ * User-provided review
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Books_Extension_Review extends Zend_Gdata_Extension
+{
+
+ protected $_rootNamespace = 'gbs';
+ protected $_rootElement = 'review';
+ protected $_lang = null;
+ protected $_type = null;
+
+ /**
+ * Constructor for Zend_Gdata_Books_Extension_Review which
+ * User-provided review
+ *
+ * @param string|null $lang Review language.
+ * @param string|null $type Type of text construct (typically text, html,
+ * or xhtml).
+ * @param string|null $value Text content of the review.
+ */
+ public function __construct($lang = null, $type = null, $value = null)
+ {
+ $this->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 @@
+<?php
+
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: ThumbnailLink.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_Books_Extension_BooksLink
+ */
+require_once 'Zend/Gdata/Books/Extension/BooksLink.php';
+
+/**
+ * Describes a thumbnail link
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Books_Extension_ThumbnailLink extends
+ Zend_Gdata_Books_Extension_BooksLink
+{
+
+ /**
+ * Constructor for Zend_Gdata_Books_Extension_ThumbnailLink which
+ * Describes a thumbnail link
+ *
+ * @param string|null $href Linked resource URI
+ * @param string|null $rel Forward relationship
+ * @param string|null $type Resource MIME type
+ * @param string|null $hrefLang Resource language
+ * @param string|null $title Human-readable resource title
+ * @param string|null $length Resource length in octets
+ */
+ public function __construct($href = null, $rel = null, $type = null,
+ $hrefLang = null, $title = null, $length = null)
+ {
+ $this->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 @@
+<?php
+
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id: Viewability.php 24593 2012-01-05 20:35:02Z matthew $
+ */
+
+/**
+ * @see Zend_Gdata_Extension
+ */
+require_once 'Zend/Gdata/Extension.php';
+
+/**
+ * Describes a viewability
+ *
+ * @category Zend
+ * @package Zend_Gdata
+ * @subpackage Books
+ * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+class Zend_Gdata_Books_Extension_Viewability extends Zend_Gdata_Extension
+{
+
+ protected $_rootNamespace = 'gbs';
+ protected $_rootElement = 'viewability';
+ protected $_value = null;
+
+ /**
+ * Constructor for Zend_Gdata_Books_Extension_Viewability which
+ * Describes a viewability
+ *
+ * @param string|null $value A programmatic value representing the book's
+ * viewability mode.
+ */
+ public function __construct($value = null)
+ {
+ $this->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;
+ }
+
+
+}
+