[44] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | /**
|
---|
| 4 | * Zend Framework
|
---|
| 5 | *
|
---|
| 6 | * LICENSE
|
---|
| 7 | *
|
---|
| 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.
|
---|
| 15 | *
|
---|
| 16 | * @category Zend
|
---|
| 17 | * @package Zend_Gdata
|
---|
| 18 | * @subpackage Geo
|
---|
| 19 | * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
---|
| 20 | * @license http://framework.zend.com/license/new-bsd New BSD License
|
---|
| 21 | */
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * @see Zend_Gdata_Entry
|
---|
| 25 | */
|
---|
| 26 | require_once 'Zend/Gdata/Entry.php';
|
---|
| 27 |
|
---|
| 28 | /**
|
---|
| 29 | * @see Zend_Gdata_Geo
|
---|
| 30 | */
|
---|
| 31 | require_once 'Zend/Gdata/Geo.php';
|
---|
| 32 |
|
---|
| 33 | /**
|
---|
| 34 | * @see Zend_Gdata_Geo_Extension_GeoRssWhere
|
---|
| 35 | */
|
---|
| 36 | require_once 'Zend/Gdata/Geo/Extension/GeoRssWhere.php';
|
---|
| 37 |
|
---|
| 38 | /**
|
---|
| 39 | * An Atom entry containing Geograpic data.
|
---|
| 40 | *
|
---|
| 41 | * @category Zend
|
---|
| 42 | * @package Zend_Gdata
|
---|
| 43 | * @subpackage Geo
|
---|
| 44 | * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
---|
| 45 | * @license http://framework.zend.com/license/new-bsd New BSD License
|
---|
| 46 | */
|
---|
| 47 | class Zend_Gdata_Geo_Entry extends Zend_Gdata_Entry
|
---|
| 48 | {
|
---|
| 49 |
|
---|
| 50 | protected $_entryClassName = 'Zend_Gdata_Geo_Entry';
|
---|
| 51 |
|
---|
| 52 | protected $_where = null;
|
---|
| 53 |
|
---|
| 54 | public function __construct($element = null)
|
---|
| 55 | {
|
---|
| 56 | $this->registerAllNamespaces(Zend_Gdata_Geo::$namespaces);
|
---|
| 57 | parent::__construct($element);
|
---|
| 58 | }
|
---|
| 59 |
|
---|
| 60 | public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
|
---|
| 61 | {
|
---|
| 62 | $element = parent::getDOM($doc, $majorVersion, $minorVersion);
|
---|
| 63 | if ($this->_where != null) {
|
---|
| 64 | $element->appendChild($this->_where->getDOM($element->ownerDocument));
|
---|
| 65 | }
|
---|
| 66 | return $element;
|
---|
| 67 | }
|
---|
| 68 |
|
---|
| 69 | protected function takeChildFromDOM($child)
|
---|
| 70 | {
|
---|
| 71 | $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
|
---|
| 72 | switch ($absoluteNodeName) {
|
---|
| 73 | case $this->lookupNamespace('georss') . ':' . 'where':
|
---|
| 74 | $where = new Zend_Gdata_Geo_Extension_GeoRssWhere();
|
---|
| 75 | $where->transferFromDOM($child);
|
---|
| 76 | $this->_where = $where;
|
---|
| 77 | break;
|
---|
| 78 | default:
|
---|
| 79 | parent::takeChildFromDOM($child);
|
---|
| 80 | break;
|
---|
| 81 | }
|
---|
| 82 | }
|
---|
| 83 |
|
---|
| 84 | public function getWhere()
|
---|
| 85 | {
|
---|
| 86 | return $this->_where;
|
---|
| 87 | }
|
---|
| 88 |
|
---|
| 89 | public function setWhere($value)
|
---|
| 90 | {
|
---|
| 91 | $this->_where = $value;
|
---|
| 92 | return $this;
|
---|
| 93 | }
|
---|
| 94 |
|
---|
| 95 |
|
---|
| 96 | }
|
---|