Zend_Gdata_App_Extension_Person

Base class for people (currently used by atom:author, atom:contributor).

Defined (1)

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

/inc/VideoUploader/includes/Zend/Gdata/App/Extension/Person.php  
  1. abstract class Zend_Gdata_App_Extension_Person extends Zend_Gdata_App_Extension 
  2.  
  3. protected $_rootElement = null; 
  4. protected $_name = null; 
  5. protected $_email = null; 
  6. protected $_uri = null; 
  7.  
  8. public function __construct($name = null, $email = null, $uri = null) 
  9. parent::__construct(); 
  10. $this->_name = $name; 
  11. $this->_email = $email; 
  12. $this->_uri = $uri; 
  13.  
  14. public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 
  15. $element = parent::getDOM($doc, $majorVersion, $minorVersion); 
  16. if ($this->_name != null) { 
  17. $element->appendChild($this->_name->getDOM($element->ownerDocument)); 
  18. if ($this->_email != null) { 
  19. $element->appendChild($this->_email->getDOM($element->ownerDocument)); 
  20. if ($this->_uri != null) { 
  21. $element->appendChild($this->_uri->getDOM($element->ownerDocument)); 
  22. return $element; 
  23.  
  24. protected function takeChildFromDOM($child) 
  25. $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; 
  26. switch ($absoluteNodeName) { 
  27. case $this->lookupNamespace('atom') . ':' . 'name': 
  28. $name = new Zend_Gdata_App_Extension_Name(); 
  29. $name->transferFromDOM($child); 
  30. $this->_name = $name; 
  31. break; 
  32. case $this->lookupNamespace('atom') . ':' . 'email': 
  33. $email = new Zend_Gdata_App_Extension_Email(); 
  34. $email->transferFromDOM($child); 
  35. $this->_email = $email; 
  36. break; 
  37. case $this->lookupNamespace('atom') . ':' . 'uri': 
  38. $uri = new Zend_Gdata_App_Extension_Uri(); 
  39. $uri->transferFromDOM($child); 
  40. $this->_uri = $uri; 
  41. break; 
  42. default: 
  43. parent::takeChildFromDOM($child); 
  44. break; 
  45.  
  46. /** 
  47. * @return Zend_Gdata_App_Extension_Name 
  48. */ 
  49. public function getName() 
  50. return $this->_name; 
  51.  
  52. /** 
  53. * @param Zend_Gdata_App_Extension_Name $value 
  54. * @return Zend_Gdata_App_Entry Provides a fluent interface 
  55. */ 
  56. public function setName($value) 
  57. $this->_name = $value; 
  58. return $this; 
  59.  
  60. /** 
  61. * @return Zend_Gdata_App_Extension_Email 
  62. */ 
  63. public function getEmail() 
  64. return $this->_email; 
  65.  
  66. /** 
  67. * @param Zend_Gdata_App_Extension_Email $value 
  68. * @return Zend_Gdata_App_Extension_Person Provides a fluent interface 
  69. */ 
  70. public function setEmail($value) 
  71. $this->_email = $value; 
  72. return $this; 
  73.  
  74. /** 
  75. * @return Zend_Gdata_App_Extension_Uri 
  76. */ 
  77. public function getUri() 
  78. return $this->_uri; 
  79.  
  80. /** 
  81. * @param Zend_Gdata_App_Extension_Uri $value 
  82. * @return Zend_Gdata_App_Extension_Person Provides a fluent interface 
  83. */ 
  84. public function setUri($value) 
  85. $this->_uri = $value; 
  86. return $this; 
  87.