示例#1
0
 public function testToAndFromString()
 {
     $this->rowCount->setText('20');
     $this->assertTrue($this->rowCount->getText() == '20');
     $newRowCount = new Extension\RowCount();
     $doc = new \DOMDocument();
     $doc->loadXML($this->rowCount->saveXML());
     $newRowCount->transferFromDom($doc->documentElement);
     $this->assertTrue($this->rowCount->getText() == $newRowCount->getText());
 }
示例#2
0
 public function testGetSetCounts()
 {
     $newRowCount = new Extension\RowCount();
     $newRowCount->setText("20");
     $newColCount = new Extension\ColCount();
     $newColCount->setText("50");
     $this->cellFeed->setRowCount($newRowCount);
     $this->cellFeed->setColumnCount($newColCount);
     $this->assertTrue($this->cellFeed->getRowCount()->getText() == "20");
     $this->assertTrue($this->cellFeed->getColumnCount()->getText() == "50");
 }
示例#3
0
 public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
 {
     $element = parent::getDOM($doc, $majorVersion, $minorVersion);
     if ($this->rowCount != null) {
         $element->appendChild($this->_rowCount->getDOM($element->ownerDocument));
     }
     if ($this->colCount != null) {
         $element->appendChild($this->_colCount->getDOM($element->ownerDocument));
     }
     return $element;
 }
示例#4
0
 /**
  * Creates individual Entry objects of the appropriate type and
  * stores them in the $_entry array based upon DOM data.
  *
  * @param DOMNode $child The DOMNode to process
  */
 protected function takeChildFromDOM($child)
 {
     $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
     switch ($absoluteNodeName) {
         case $this->lookupNamespace('gs') . ':' . 'rowCount':
             $rowCount = new Extension\RowCount();
             $rowCount->transferFromDOM($child);
             $this->_rowCount = $rowCount;
             break;
         case $this->lookupNamespace('gs') . ':' . 'colCount':
             $colCount = new Extension\ColCount();
             $colCount->transferFromDOM($child);
             $this->_colCount = $colCount;
             break;
         default:
             parent::takeChildFromDOM($child);
             break;
     }
 }