File indexing completed on 2024-12-22 05:36:45

0001 <?php
0002 
0003 /**
0004  * Zend Framework
0005  *
0006  * LICENSE
0007  *
0008  * This source file is subject to the new BSD license that is bundled
0009  * with this package in the file LICENSE.txt.
0010  * It is also available through the world-wide-web at this URL:
0011  * http://framework.zend.com/license/new-bsd
0012  * If you did not receive a copy of the license and are unable to
0013  * obtain it through the world-wide-web, please send an email
0014  * to license@zend.com so we can send you a copy immediately.
0015  *
0016  * @category   Zend
0017  * @package    Zend_Gdata
0018  * @subpackage Geo
0019  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0020  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0021  * @version    $Id$
0022  */
0023 
0024 /**
0025  * @see Zend_Gdata_Entry
0026  */
0027 // require_once 'Zend/Gdata/Entry.php';
0028 
0029 /**
0030  * @see Zend_Gdata_Geo
0031  */
0032 // require_once 'Zend/Gdata/Geo.php';
0033 
0034 /**
0035  * @see Zend_Gdata_Geo_Extension_GeoRssWhere
0036  */
0037 // require_once 'Zend/Gdata/Geo/Extension/GeoRssWhere.php';
0038 
0039 /**
0040  * An Atom entry containing Geograpic data.
0041  *
0042  * @category   Zend
0043  * @package    Zend_Gdata
0044  * @subpackage Geo
0045  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0046  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0047  */
0048 class Zend_Gdata_Geo_Entry extends Zend_Gdata_Entry
0049 {
0050 
0051     protected $_entryClassName = 'Zend_Gdata_Geo_Entry';
0052 
0053     protected $_where = null;
0054 
0055     public function __construct($element = null)
0056     {
0057         $this->registerAllNamespaces(Zend_Gdata_Geo::$namespaces);
0058         parent::__construct($element);
0059     }
0060 
0061     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
0062     {
0063         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
0064         if ($this->_where != null) {
0065             $element->appendChild($this->_where->getDOM($element->ownerDocument));
0066         }
0067         return $element;
0068     }
0069 
0070     protected function takeChildFromDOM($child)
0071     {
0072         $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
0073         switch ($absoluteNodeName) {
0074         case $this->lookupNamespace('georss') . ':' . 'where':
0075             $where = new Zend_Gdata_Geo_Extension_GeoRssWhere();
0076             $where->transferFromDOM($child);
0077             $this->_where = $where;
0078             break;
0079         default:
0080             parent::takeChildFromDOM($child);
0081             break;
0082         }
0083     }
0084 
0085     public function getWhere()
0086     {
0087         return $this->_where;
0088     }
0089 
0090     public function setWhere($value)
0091     {
0092         $this->_where = $value;
0093         return $this;
0094     }
0095 
0096 
0097 }