Zend_Gdata_Calendar_Extension_WebContent

Represents the gCal:webContent element used by the Calendar data API.

Defined (1)

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

/inc/VideoUploader/includes/Zend/Gdata/Calendar/Extension/WebContent.php  
  1. class Zend_Gdata_Calendar_Extension_WebContent extends Zend_Gdata_App_Extension 
  2.  
  3. protected $_rootNamespace = 'gCal'; 
  4. protected $_rootElement = 'webContent'; 
  5. protected $_url = null; 
  6. protected $_height = null; 
  7. protected $_width = null; 
  8.  
  9. /** 
  10. * Constructs a new Zend_Gdata_Calendar_Extension_WebContent object. 
  11. * @param string $url (optional) The value for this element's URL attribute. 
  12. * @param string $height (optional) The value for this element's height attribute. 
  13. * @param string $width (optional) The value for this element's width attribute. 
  14. */ 
  15. public function __construct($url = null, $height = null, $width = null) 
  16. $this->registerAllNamespaces(Zend_Gdata_Calendar::$namespaces); 
  17. parent::__construct(); 
  18. $this->_url = $url; 
  19. $this->_height = $height; 
  20. $this->_width = $width; 
  21.  
  22. /** 
  23. * Retrieves a DOMElement which corresponds to this element and all 
  24. * child properties. This is used to build an entry back into a DOM 
  25. * and eventually XML text for sending to the server upon updates, or 
  26. * for application storage/persistence. 
  27. * @param DOMDocument $doc The DOMDocument used to construct DOMElements 
  28. * @return DOMElement The DOMElement representing this element and all 
  29. * child properties. 
  30. */ 
  31. public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 
  32. $element = parent::getDOM($doc, $majorVersion, $minorVersion); 
  33. if ($this->url != null) { 
  34. $element->setAttribute('url', $this->_url); 
  35. if ($this->height != null) { 
  36. $element->setAttribute('height', $this->_height); 
  37. if ($this->width != null) { 
  38. $element->setAttribute('width', $this->_width); 
  39. return $element; 
  40.  
  41. /** 
  42. * Given a DOMNode representing an attribute, tries to map the data into 
  43. * instance members. If no mapping is defined, the name and value are 
  44. * stored in an array. 
  45. * @param DOMNode $attribute The DOMNode attribute needed to be handled 
  46. */ 
  47. protected function takeAttributeFromDOM($attribute) 
  48. switch ($attribute->localName) { 
  49. case 'url': 
  50. $this->_url = $attribute->nodeValue; 
  51. break; 
  52. case 'height': 
  53. $this->_height = $attribute->nodeValue; 
  54. break; 
  55. case 'width': 
  56. $this->_width = $attribute->nodeValue; 
  57. break; 
  58. default: 
  59. parent::takeAttributeFromDOM($attribute); 
  60.  
  61. /** 
  62. * Get the value for this element's URL attribute. 
  63. * @return string The desired value for this attribute. 
  64. */ 
  65. public function getURL() 
  66. return $this->_url; 
  67.  
  68. /** 
  69. * Set the value for this element's URL attribute. 
  70. * @param bool $value The desired value for this attribute. 
  71. * @return Zend_Gdata_Calendar_Extension_WebContent The element being modified. 
  72. */ 
  73. public function setURL($value) 
  74. $this->_url = $value; 
  75. return $this; 
  76.  
  77. /** 
  78. * Get the value for this element's height attribute. 
  79. * @return int The desired value for this attribute. 
  80. */ 
  81. public function getHeight() 
  82. return $this->_height; 
  83.  
  84. /** 
  85. * Set the value for this element's height attribute. 
  86. * @param int $value The desired value for this attribute. 
  87. * @return Zend_Gdata_Calendar_Extension_WebContent The element being modified. 
  88. */ 
  89. public function setHeight($value) 
  90. $this->_height = $value; 
  91. return $this; 
  92.  
  93. /** 
  94. * Get the value for this element's height attribute. 
  95. * @return int The desired value for this attribute. 
  96. */ 
  97. public function getWidth() 
  98. return $this->_width; 
  99.  
  100. /** 
  101. * Set the value for this element's height attribute. 
  102. * @param int $value The desired value for this attribute. 
  103. * @return Zend_Gdata_Calendar_Extension_WebContent The element being modified. 
  104. */ 
  105. public function setWidth($value) 
  106. $this->_width = $value; 
  107. return $this; 
  108.