$nsUri) { $this->registerNamespace($nsPrefix, $nsUri); } parent::__construct($element); } public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) { $element = parent::getDOM($doc, $majorVersion, $minorVersion); if ($this->_duration !== null) { $element->appendChild($this->_duration->getDOM($element->ownerDocument)); } if ($this->_private !== null) { $element->appendChild($this->_private->getDOM($element->ownerDocument)); } return $element; } /** * Creates individual Entry objects of the appropriate type and * stores them in the $_entry array based upon DOM data. * * @param DOMNode $child The DOMNode to process */ protected function takeChildFromDOM($child) { $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; switch ($absoluteNodeName) { case $this->lookupNamespace('media') . ':' . 'content': $content = new Zend_Gdata_YouTube_Extension_MediaContent(); $content->transferFromDOM($child); $this->_content[] = $content; break; case $this->lookupNamespace('yt') . ':' . 'duration': $duration = new Zend_Gdata_YouTube_Extension_Duration(); $duration->transferFromDOM($child); $this->_duration = $duration; break; case $this->lookupNamespace('yt') . ':' . 'private': $private = new Zend_Gdata_YouTube_Extension_Private(); $private->transferFromDOM($child); $this->_private = $private; break; default: parent::takeChildFromDOM($child); break; } } /** * Returns the duration value of this element * * @return Zend_Gdata_YouTube_Extension_Duration */ public function getDuration() { return $this->_duration; } /** * Sets the duration value of this element * * @param Zend_Gdata_YouTube_Extension_Duration $value The duration value * @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent interface */ public function setDuration($value) { $this->_duration = $value; return $this; } /** * Returns the private value of this element * * @return Zend_Gdata_YouTube_Extension_Private */ public function getPrivate() { return $this->_private; } /** * Sets the private value of this element * * @param Zend_Gdata_YouTube_Extension_Private $value The private value * @return Zend_Gdata_YouTube_Extension_MediaGroup Provides a fluent interface */ public function setPrivate($value) { $this->_private = $value; return $this; } }