From 06f945f27840b53e57795dadbc38e76f7e11ab1c Mon Sep 17 00:00:00 2001 From: Horus3 Date: Mon, 24 Feb 2014 16:42:14 +0100 Subject: init --- zend/library/Zend/Gdata/Spreadsheets/CellEntry.php | 104 +++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 zend/library/Zend/Gdata/Spreadsheets/CellEntry.php (limited to 'zend/library/Zend/Gdata/Spreadsheets/CellEntry.php') diff --git a/zend/library/Zend/Gdata/Spreadsheets/CellEntry.php b/zend/library/Zend/Gdata/Spreadsheets/CellEntry.php new file mode 100644 index 0000000..906ad71 --- /dev/null +++ b/zend/library/Zend/Gdata/Spreadsheets/CellEntry.php @@ -0,0 +1,104 @@ +registerAllNamespaces(Zend_Gdata_Spreadsheets::$namespaces); + parent::__construct($element); + } + + public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null) + { + $element = parent::getDOM($doc, $majorVersion, $minorVersion); + if ($this->_cell != null) { + $element->appendChild($this->_cell->getDOM($element->ownerDocument)); + } + return $element; + } + + protected function takeChildFromDOM($child) + { + $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; + switch ($absoluteNodeName) { + case $this->lookupNamespace('gs') . ':' . 'cell'; + $cell = new Zend_Gdata_Spreadsheets_Extension_Cell(); + $cell->transferFromDOM($child); + $this->_cell = $cell; + break; + default: + parent::takeChildFromDOM($child); + break; + } + } + + /** + * Gets the Cell element of this Cell Entry. + * @return Zend_Gdata_Spreadsheets_Extension_Cell + */ + public function getCell() + { + return $this->_cell; + } + + /** + * Sets the Cell element of this Cell Entry. + * @param Zend_Gdata_Spreadsheets_Extension_Cell $cell + * @return Zend_Gdata_Spreadsheets_CellEntry + */ + public function setCell($cell) + { + $this->_cell = $cell; + return $this; + } + +} -- cgit v1.2.3