8 * This source file is subject to the new BSD license that is bundled
9 * with this package in the file LICENSE.txt.
10 * It is also available through the world-wide-web at this URL:
11 * http://framework.zend.com/license/new-bsd
12 * If you did not receive a copy of the license and are unable to
13 * obtain it through the world-wide-web, please send an email
14 * to license@zend.com so we can send you a copy immediately.
19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
25 * @see Zend_Gdata_Entry
27 require_once 'Zend/Gdata/Entry.php';
32 require_once 'Zend/Gdata/Geo.php';
35 * @see Zend_Gdata_Geo_Extension_GeoRssWhere
37 require_once 'Zend/Gdata/Geo/Extension/GeoRssWhere.php';
40 * An Atom entry containing Geograpic data.
45 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
46 * @license http://framework.zend.com/license/new-bsd New BSD License
48 class Zend_Gdata_Geo_Entry extends Zend_Gdata_Entry
51 protected $_entryClassName = 'Zend_Gdata_Geo_Entry';
53 protected $_where = null;
55 public function __construct($element = null)
57 $this->registerAllNamespaces(Zend_Gdata_Geo::$namespaces);
58 parent::__construct($element);
61 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
63 $element = parent::getDOM($doc, $majorVersion, $minorVersion);
64 if ($this->_where != null) {
65 $element->appendChild($this->_where->getDOM($element->ownerDocument));
70 protected function takeChildFromDOM($child)
72 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
73 switch ($absoluteNodeName) {
74 case $this->lookupNamespace('georss') . ':' . 'where':
75 $where = new Zend_Gdata_Geo_Extension_GeoRssWhere();
76 $where->transferFromDOM($child);
77 $this->_where = $where;
80 parent::takeChildFromDOM($child);
85 public function getWhere()
90 public function setWhere($value)
92 $this->_where = $value;