Zend_Gdata_Gapps_OwnerEntry

Data model class for a Google Apps Owner Entry.

Defined (1)

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

/inc/VideoUploader/includes/Zend/Gdata/Gapps/OwnerEntry.php  
  1. class Zend_Gdata_Gapps_OwnerEntry extends Zend_Gdata_Entry 
  2.  
  3. protected $_entryClassName = 'Zend_Gdata_Gapps_OwnerEntry'; 
  4.  
  5. /** 
  6. * <apps:property> element containing information about other items 
  7. * relevant to this entry. 
  8. * @var Zend_Gdata_Gapps_Extension_Property 
  9. */ 
  10. protected $_property = array(); 
  11.  
  12. /** 
  13. * Create a new instance. 
  14. * @param DOMElement $element (optional) DOMElement from which this 
  15. * object should be constructed. 
  16. */ 
  17. public function __construct($element = null) 
  18. $this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces); 
  19. parent::__construct($element); 
  20.  
  21. /** 
  22. * Retrieves a DOMElement which corresponds to this element and all 
  23. * child properties. This is used to build an entry back into a DOM 
  24. * and eventually XML text for application storage/persistence. 
  25. * @param DOMDocument $doc The DOMDocument used to construct DOMElements 
  26. * @return DOMElement The DOMElement representing this element and all 
  27. * child properties. 
  28. */ 
  29. public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 
  30. $element = parent::getDOM($doc, $majorVersion, $minorVersion); 
  31.  
  32. foreach ($this->_property as $p) { 
  33. $element->appendChild($p->getDOM($element->ownerDocument)); 
  34. return $element; 
  35.  
  36. /** 
  37. * Creates individual Entry objects of the appropriate type and 
  38. * stores them as owners of this entry based upon DOM data. 
  39. * @param DOMNode $child The DOMNode to process 
  40. */ 
  41. protected function takeChildFromDOM($child) 
  42. $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; 
  43.  
  44. switch ($absoluteNodeName) { 
  45.  
  46. case $this->lookupNamespace('apps') . ':' . 'property'; 
  47. $property = new Zend_Gdata_Gapps_Extension_Property(); 
  48. $property->transferFromDOM($child); 
  49. $this->_property[] = $property; 
  50. break; 
  51. default: 
  52. parent::takeChildFromDOM($child); 
  53. break; 
  54.  
  55. /** 
  56. * Returns all property tags for this entry 
  57. * @param string $rel The rel value of the property to be found. If null,  
  58. * the array of properties is returned instead. 
  59. * @return mixed Either an array of Zend_Gdata_Gapps_Extension_Property 
  60. * objects if $rel is null, a single 
  61. * Zend_Gdata_Gapps_Extension_Property object if $rel is specified 
  62. * and a matching feed link is found, or null if $rel is 
  63. * specified and no matching property is found. 
  64. */ 
  65. public function getProperty($rel = null) 
  66. if ($rel == null) { 
  67. return $this->_property; 
  68. } else { 
  69. foreach ($this->_property as $p) { 
  70. if ($p->rel == $rel) { 
  71. return $p; 
  72. return null; 
  73.  
  74. /** 
  75. * Set the value of the property property for this object. 
  76. * @param array $value A collection of 
  77. * Zend_Gdata_Gapps_Extension_Property objects. 
  78. * @return Zend_Gdata_Gapps_OwnerEntry Provides a fluent interface. 
  79. */ 
  80. public function setProperty($value) 
  81. $this->_property = $value; 
  82. return $this; 
  83.