|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00027 require_once 'Zend/Gdata/Entry.php'; 00028 00032 require_once 'Zend/Gdata/Geo.php'; 00033 00037 require_once 'Zend/Gdata/Geo/Extension/GeoRssWhere.php'; 00038 00048 class Zend_Gdata_Geo_Entry extends Zend_Gdata_Entry 00049 { 00050 00051 protected $_entryClassName = 'Zend_Gdata_Geo_Entry'; 00052 00053 protected $_where = null; 00054 00055 public function __construct($element = null) 00056 { 00057 $this->registerAllNamespaces(Zend_Gdata_Geo::$namespaces); 00058 parent::__construct($element); 00059 } 00060 00061 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) 00062 { 00063 $element = parent::getDOM($doc, $majorVersion, $minorVersion); 00064 if ($this->_where != null) { 00065 $element->appendChild($this->_where->getDOM($element->ownerDocument)); 00066 } 00067 return $element; 00068 } 00069 00070 protected function takeChildFromDOM($child) 00071 { 00072 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; 00073 switch ($absoluteNodeName) { 00074 case $this->lookupNamespace('georss') . ':' . 'where': 00075 $where = new Zend_Gdata_Geo_Extension_GeoRssWhere(); 00076 $where->transferFromDOM($child); 00077 $this->_where = $where; 00078 break; 00079 default: 00080 parent::takeChildFromDOM($child); 00081 break; 00082 } 00083 } 00084 00085 public function getWhere() 00086 { 00087 return $this->_where; 00088 } 00089 00090 public function setWhere($value) 00091 { 00092 $this->_where = $value; 00093 return $this; 00094 } 00095 00096 00097 }