Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Geo/Extension/GmlPoint.php
Go to the documentation of this file.
00001 <?php
00002 
00027 require_once 'Zend/Gdata/Extension.php';
00028 
00032 require_once 'Zend/Gdata/Geo.php';
00033 
00037 require_once 'Zend/Gdata/Geo/Extension/GmlPos.php';
00038 
00039 
00049 class Zend_Gdata_Geo_Extension_GmlPoint extends Zend_Gdata_Extension
00050 {
00051 
00052     protected $_rootNamespace = 'gml';
00053     protected $_rootElement = 'Point';
00054 
00060     protected $_pos = null;
00061 
00068     public function __construct($pos = null)
00069     {
00070         $this->registerAllNamespaces(Zend_Gdata_Geo::$namespaces);
00071         parent::__construct();
00072         $this->setPos($pos);
00073     }
00074 
00084     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00085     {
00086         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00087         if ($this->_pos !== null) {
00088             $element->appendChild($this->_pos->getDOM($element->ownerDocument));
00089         }
00090         return $element;
00091     }
00092 
00099     protected function takeChildFromDOM($child)
00100     {
00101         $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
00102 
00103         switch ($absoluteNodeName) {
00104             case $this->lookupNamespace('gml') . ':' . 'pos';
00105                 $pos = new Zend_Gdata_Geo_Extension_GmlPos();
00106                 $pos->transferFromDOM($child);
00107                 $this->_pos = $pos;
00108                 break;
00109         }
00110     }
00111 
00118     public function getPos()
00119     {
00120         return $this->_pos;
00121     }
00122 
00129     public function setPos($value)
00130     {
00131         $this->_pos = $value;
00132         return $this;
00133     }
00134 
00135 
00136 }
 All Data Structures Namespaces Files Functions Variables Enumerations