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.
18 * @subpackage Spreadsheets
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_Feed
27 require_once 'Zend/Gdata/Feed.php';
30 * @see Zend_Gdata_Spreadsheets_Extension_RowCount
32 require_once 'Zend/Gdata/Spreadsheets/Extension/RowCount.php';
35 * @see Zend_Gdata_Spreadsheets_Extension_ColCount
37 require_once 'Zend/Gdata/Spreadsheets/Extension/ColCount.php';
43 * @subpackage Spreadsheets
44 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
45 * @license http://framework.zend.com/license/new-bsd New BSD License
47 class Zend_Gdata_Spreadsheets_CellFeed extends Zend_Gdata_Feed
51 * The classname for individual feed elements.
55 protected $_entryClassName = 'Zend_Gdata_Spreadsheets_CellEntry';
58 * The classname for the feed.
62 protected $_feedClassName = 'Zend_Gdata_Spreadsheets_CellFeed';
65 * The row count for the feed.
67 * @var Zend_Gdata_Spreadsheets_Extension_RowCount
69 protected $_rowCount = null;
72 * The column count for the feed.
74 * @var Zend_Gdata_Spreadsheets_Extension_ColCount
76 protected $_colCount = null;
79 * Constructs a new Zend_Gdata_Spreadsheets_CellFeed object.
80 * @param DOMElement $element (optional) The XML Element on which to base this object.
82 public function __construct($element = null)
84 $this->registerAllNamespaces(Zend_Gdata_Spreadsheets::$namespaces);
85 parent::__construct($element);
88 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
90 $element = parent::getDOM($doc, $majorVersion, $minorVersion);
91 if ($this->rowCount != null) {
92 $element->appendChild($this->_rowCount->getDOM($element->ownerDocument));
94 if ($this->colCount != null) {
95 $element->appendChild($this->_colCount->getDOM($element->ownerDocument));
100 protected function takeChildFromDOM($child)
102 $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
103 switch ($absoluteNodeName) {
104 case $this->lookupNamespace('gs') . ':' . 'rowCount';
105 $rowCount = new Zend_Gdata_Spreadsheets_Extension_RowCount();
106 $rowCount->transferFromDOM($child);
107 $this->_rowCount = $rowCount;
109 case $this->lookupNamespace('gs') . ':' . 'colCount';
110 $colCount = new Zend_Gdata_Spreadsheets_Extension_ColCount();
111 $colCount->transferFromDOM($child);
112 $this->_colCount = $colCount;
115 parent::takeChildFromDOM($child);
121 * Gets the row count for this feed.
122 * @return string The row count for the feed.
124 public function getRowCount()
126 return $this->_rowCount;
130 * Gets the column count for this feed.
131 * @return string The column count for the feed.
133 public function getColumnCount()
135 return $this->_colCount;
139 * Sets the row count for this feed.
140 * @param string $rowCount The new row count for the feed.
142 public function setRowCount($rowCount)
144 $this->_rowCount = $rowCount;
149 * Sets the column count for this feed.
150 * @param string $colCount The new column count for the feed.
152 public function setColumnCount($colCount)
154 $this->_colCount = $colCount;