Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/zend/Zend/Gdata/Spreadsheets/Extension/Cell.php
Go to the documentation of this file.
00001 <?php
00026 require_once 'Zend/Gdata/Entry.php';
00027 
00031 require_once 'Zend/Gdata/Extension.php';
00032 
00033 
00043 class Zend_Gdata_Spreadsheets_Extension_Cell extends Zend_Gdata_Extension
00044 {
00045     protected $_rootElement = 'cell';
00046     protected $_rootNamespace = 'gs';
00047 
00053     protected $_row = null;
00054 
00060     protected $_col = null;
00061 
00067     protected $_inputValue = null;
00068 
00074     protected $_numericValue = null;
00075 
00085     public function __construct($text = null, $row = null, $col = null, $inputValue = null, $numericValue = null)
00086     {
00087         $this->registerAllNamespaces(Zend_Gdata_Spreadsheets::$namespaces);
00088         parent::__construct();
00089         $this->_text = $text;
00090         $this->_row = $row;
00091         $this->_col = $col;
00092         $this->_inputValue = $inputValue;
00093         $this->_numericValue = $numericValue;
00094     }
00095 
00096     public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
00097     {
00098         $element = parent::getDOM($doc, $majorVersion, $minorVersion);
00099         $element->setAttribute('row', $this->_row);
00100         $element->setAttribute('col', $this->_col);
00101         if ($this->_inputValue) $element->setAttribute('inputValue', $this->_inputValue);
00102         if ($this->_numericValue) $element->setAttribute('numericValue', $this->_numericValue);
00103         return $element;
00104     }
00105 
00106     protected function takeAttributeFromDOM($attribute)
00107     {
00108         switch ($attribute->localName) {
00109         case 'row':
00110             $this->_row = $attribute->nodeValue;
00111             break;
00112         case 'col':
00113             $this->_col = $attribute->nodeValue;
00114             break;
00115         case 'inputValue':
00116             $this->_inputValue = $attribute->nodeValue;
00117             break;
00118         case 'numericValue':
00119             $this->_numericValue = $attribute->nodeValue;
00120             break;
00121         default:
00122             parent::takeAttributeFromDOM($attribute);
00123         }
00124     }
00125 
00130     public function getRow()
00131     {
00132         return $this->_row;
00133     }
00134 
00139     public function getColumn()
00140     {
00141         return $this->_col;
00142     }
00143 
00148     public function getInputValue()
00149     {
00150         return $this->_inputValue;
00151     }
00152 
00157     public function getNumericValue()
00158     {
00159         return $this->_numericValue;
00160     }
00161 
00166     public function setRow($row)
00167     {
00168         $this->_row = $row;
00169         return $this;
00170     }
00171 
00176     public function setColumn($col)
00177     {
00178         $this->_col = $col;
00179         return $this;
00180     }
00181 
00186     public function setInputValue($inputValue)
00187     {
00188         $this->_inputValue = $inputValue;
00189         return $this;
00190     }
00191 
00196     public function setNumericValue($numericValue)
00197     {
00198         $this->_numericValue = $numericValue;
00199     }
00200 
00201 }
 All Data Structures Namespaces Files Functions Variables Enumerations