Zend_Gdata_App_Extension_Link

Data model for representing an atom:link element.

Defined (1)

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

/inc/VideoUploader/includes/Zend/Gdata/App/Extension/Link.php  
  1. class Zend_Gdata_App_Extension_Link extends Zend_Gdata_App_Extension 
  2.  
  3. protected $_rootElement = 'link'; 
  4. protected $_href = null; 
  5. protected $_rel = null; 
  6. protected $_type = null; 
  7. protected $_hrefLang = null; 
  8. protected $_title = null; 
  9. protected $_length = null; 
  10.  
  11. public function __construct($href = null, $rel = null, $type = null,  
  12. $hrefLang = null, $title = null, $length = null) 
  13. parent::__construct(); 
  14. $this->_href = $href; 
  15. $this->_rel = $rel; 
  16. $this->_type = $type; 
  17. $this->_hrefLang = $hrefLang; 
  18. $this->_title = $title; 
  19. $this->_length = $length; 
  20.  
  21. public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 
  22. $element = parent::getDOM($doc, $majorVersion, $minorVersion); 
  23. if ($this->_href !== null) { 
  24. $element->setAttribute('href', $this->_href); 
  25. if ($this->_rel !== null) { 
  26. $element->setAttribute('rel', $this->_rel); 
  27. if ($this->_type !== null) { 
  28. $element->setAttribute('type', $this->_type); 
  29. if ($this->_hrefLang !== null) { 
  30. $element->setAttribute('hreflang', $this->_hrefLang); 
  31. if ($this->_title !== null) { 
  32. $element->setAttribute('title', $this->_title); 
  33. if ($this->_length !== null) { 
  34. $element->setAttribute('length', $this->_length); 
  35. return $element; 
  36.  
  37. protected function takeAttributeFromDOM($attribute) 
  38. switch ($attribute->localName) { 
  39. case 'href': 
  40. $this->_href = $attribute->nodeValue; 
  41. break; 
  42. case 'rel': 
  43. $this->_rel = $attribute->nodeValue; 
  44. break; 
  45. case 'type': 
  46. $this->_type = $attribute->nodeValue; 
  47. break; 
  48. case 'hreflang': 
  49. $this->_hrefLang = $attribute->nodeValue; 
  50. break; 
  51. case 'title': 
  52. $this->_title = $attribute->nodeValue; 
  53. break; 
  54. case 'length': 
  55. $this->_length = $attribute->nodeValue; 
  56. break; 
  57. default: 
  58. parent::takeAttributeFromDOM($attribute); 
  59.  
  60. /** 
  61. * @return string|null 
  62. */ 
  63. public function getHref() 
  64. return $this->_href; 
  65.  
  66. /** 
  67. * @param string|null $value 
  68. * @return Zend_Gdata_App_Entry Provides a fluent interface 
  69. */ 
  70. public function setHref($value) 
  71. $this->_href = $value; 
  72. return $this; 
  73.  
  74. /** 
  75. * @return string|null 
  76. */ 
  77. public function getRel() 
  78. return $this->_rel; 
  79.  
  80. /** 
  81. * @param string|null $value 
  82. * @return Zend_Gdata_App_Entry Provides a fluent interface 
  83. */ 
  84. public function setRel($value) 
  85. $this->_rel = $value; 
  86. return $this; 
  87.  
  88. /** 
  89. * @return string|null 
  90. */ 
  91. public function getType() 
  92. return $this->_type; 
  93.  
  94. /** 
  95. * @param string|null $value 
  96. * @return Zend_Gdata_App_Entry Provides a fluent interface 
  97. */ 
  98. public function setType($value) 
  99. $this->_type = $value; 
  100. return $this; 
  101.  
  102. /** 
  103. * @return string|null 
  104. */ 
  105. public function getHrefLang() 
  106. return $this->_hrefLang; 
  107.  
  108. /** 
  109. * @param string|null $value 
  110. * @return Zend_Gdata_App_Entry Provides a fluent interface 
  111. */ 
  112. public function setHrefLang($value) 
  113. $this->_hrefLang = $value; 
  114. return $this; 
  115.  
  116. /** 
  117. * @return string|null 
  118. */ 
  119. public function getTitle() 
  120. return $this->_title; 
  121.  
  122. /** 
  123. * @param string|null $value 
  124. * @return Zend_Gdata_App_Entry Provides a fluent interface 
  125. */ 
  126. public function setTitle($value) 
  127. $this->_title = $value; 
  128. return $this; 
  129.  
  130. /** 
  131. * @return string|null 
  132. */ 
  133. public function getLength() 
  134. return $this->_length; 
  135.  
  136. /** 
  137. * @param string|null $value 
  138. * @return Zend_Gdata_App_Entry Provides a fluent interface 
  139. */ 
  140. public function setLength($value) 
  141. $this->_length = $value; 
  142. return $this; 
  143.