Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/YouTube/PlaylistVideoEntry.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/YouTube/VideoEntry.php';
00028 
00032 require_once 'Zend/Gdata/YouTube/Extension/Position.php';
00033 
00043 class Zend_Gdata_YouTube_PlaylistVideoEntry extends Zend_Gdata_YouTube_VideoEntry
00044 {
00045 
00046     protected $_entryClassName = 'Zend_Gdata_YouTube_PlaylistVideoEntry';
00047 
00053     protected $_position = null;
00054 
00062     public function __construct($element = null)
00063     {
00064         $this->registerAllNamespaces(Zend_Gdata_YouTube::$namespaces);
00065         parent::__construct($element);
00066     }
00067 
00078     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00079     {
00080         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00081         if ($this->_position !== null) {
00082             $element->appendChild($this->_position->getDOM($element->ownerDocument));
00083         }
00084         return $element;
00085     }
00086 
00093     protected function takeChildFromDOM($child)
00094     {
00095         $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
00096         switch ($absoluteNodeName) {
00097         case $this->lookupNamespace('yt') . ':' . 'position':
00098             $position = new Zend_Gdata_YouTube_Extension_Position();
00099             $position->transferFromDOM($child);
00100             $this->_position = $position;
00101             break;
00102         default:
00103             parent::takeChildFromDOM($child);
00104             break;
00105         }
00106     }
00107 
00108 
00116     public function setPosition($position = null)
00117     {
00118         $this->_position = $position;
00119         return $this;
00120     }
00121 
00127     public function getPosition()
00128     {
00129         return $this->_position;
00130     }
00131 
00132 }
 All Data Structures Namespaces Files Functions Variables Enumerations