Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Photos/CommentEntry.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/Entry.php';
00028 
00032 require_once 'Zend/Gdata/Photos/Extension/Id.php';
00033 
00037 require_once 'Zend/Gdata/Photos/Extension/PhotoId.php';
00038 
00042 require_once 'Zend/Gdata/Photos/Extension/Weight.php';
00043 
00047 require_once 'Zend/Gdata/App/Extension/Category.php';
00048 
00064 class Zend_Gdata_Photos_CommentEntry extends Zend_Gdata_Entry
00065 {
00066 
00067     protected $_entryClassName = 'Zend_Gdata_Photos_CommentEntry';
00068 
00074     protected $_gphotoId = null;
00075 
00083     protected $_gphotoPhotoId = null;
00084 
00091     public function __construct($element = null)
00092     {
00093         $this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces);
00094         parent::__construct($element);
00095 
00096         $category = new Zend_Gdata_App_Extension_Category(
00097             'http://schemas.google.com/photos/2007#comment',
00098             'http://schemas.google.com/g/2005#kind');
00099         $this->setCategory(array($category));
00100     }
00101 
00111     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00112     {
00113         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00114         if ($this->_gphotoId !== null) {
00115             $element->appendChild($this->_gphotoId->getDOM($element->ownerDocument));
00116         }
00117         if ($this->_gphotoPhotoId !== null) {
00118             $element->appendChild($this->_gphotoPhotoId->getDOM($element->ownerDocument));
00119         }
00120         return $element;
00121     }
00122 
00129     protected function takeChildFromDOM($child)
00130     {
00131         $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
00132 
00133         switch ($absoluteNodeName) {
00134             case $this->lookupNamespace('gphoto') . ':' . 'id';
00135                 $id = new Zend_Gdata_Photos_Extension_Id();
00136                 $id->transferFromDOM($child);
00137                 $this->_gphotoId = $id;
00138                 break;
00139             case $this->lookupNamespace('gphoto') . ':' . 'photoid';
00140                 $photoid = new Zend_Gdata_Photos_Extension_PhotoId();
00141                 $photoid->transferFromDOM($child);
00142                 $this->_gphotoPhotoId = $photoid;
00143                 break;
00144             default:
00145                 parent::takeChildFromDOM($child);
00146                 break;
00147         }
00148     }
00149 
00156     public function getGphotoPhotoId()
00157     {
00158         return $this->_gphotoPhotoId;
00159     }
00160 
00167     public function setGphotoPhotoId($value)
00168     {
00169         $this->_gphotoPhotoId = $value;
00170         return $this;
00171     }
00172 
00179     public function getGphotoId()
00180     {
00181         return $this->_gphotoId;
00182     }
00183 
00190     public function setGphotoId($value)
00191     {
00192         $this->_gphotoId = $value;
00193         return $this;
00194     }
00195 }
 All Data Structures Namespaces Files Functions Variables Enumerations