Zend_Gdata_Books_Extension_Viewability

Describes a viewability.

Defined (1)

The class is defined in the following location(s).

/inc/VideoUploader/includes/Zend/Gdata/Books/Extension/Viewability.php  
  1. class Zend_Gdata_Books_Extension_Viewability extends Zend_Gdata_Extension 
  2.  
  3. protected $_rootNamespace = 'gbs'; 
  4. protected $_rootElement = 'viewability'; 
  5. protected $_value = null; 
  6.  
  7. /** 
  8. * Constructor for Zend_Gdata_Books_Extension_Viewability which 
  9. * Describes a viewability 
  10. * @param string|null $value A programmatic value representing the book's 
  11. * viewability mode. 
  12. */ 
  13. public function __construct($value = null) 
  14. $this->registerAllNamespaces(Zend_Gdata_Books::$namespaces); 
  15. parent::__construct(); 
  16. $this->_value = $value; 
  17.  
  18. /** 
  19. * Retrieves DOMElement which corresponds to this element and all 
  20. * child properties. This is used to build this object back into a DOM 
  21. * and eventually XML text for sending to the server upon updates, or 
  22. * for application storage/persistance. 
  23. * @param DOMDocument $doc The DOMDocument used to construct DOMElements 
  24. * @return DOMElement The DOMElement representing this element and all 
  25. * child properties. 
  26. */ 
  27. public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 
  28. $element = parent::getDOM($doc); 
  29. if ($this->_value !== null) { 
  30. $element->setAttribute('value', $this->_value); 
  31. return $element; 
  32.  
  33. /** 
  34. * Extracts XML attributes from the DOM and converts them to the 
  35. * appropriate object members. 
  36. * @param DOMNode $attribute The DOMNode attribute to be handled. 
  37. */ 
  38. protected function takeAttributeFromDOM($attribute) 
  39. switch ($attribute->localName) { 
  40. case 'value': 
  41. $this->_value = $attribute->nodeValue; 
  42. break; 
  43. default: 
  44. parent::takeAttributeFromDOM($attribute); 
  45.  
  46. /** 
  47. * Returns the programmatic value that describes the viewability of a volume 
  48. * in Google Book Search 
  49. * @return string The value 
  50. */ 
  51. public function getValue() 
  52. return $this->_value; 
  53.  
  54. /** 
  55. * Sets the programmatic value that describes the viewability of a volume in 
  56. * Google Book Search 
  57. * @param string $value programmatic value that describes the viewability 
  58. * of a volume in Googl eBook Search 
  59. * @return Zend_Gdata_Books_Extension_Viewability Provides a fluent 
  60. * interface 
  61. */ 
  62. public function setValue($value) 
  63. $this->_value = $value; 
  64. return $this; 
  65.  
  66.