Exemplo n.º 1
0
 /**
  * Add a cell
  *
  * @param int $width
  * @param mixed $style
  * @return \PhpOffice\PhpWord\Element\Cell
  */
 public function addCell($width = null, $style = null)
 {
     $cell = new Cell($width, $style);
     $cell->setDocPart($this->getDocPart(), $this->getDocPartId());
     $cell->setPhpWord($this->phpWord);
     $cell->setNestedLevel($this->getNestedLevel());
     $this->cells[] = $cell;
     return $cell;
 }
Exemplo n.º 2
0
 /**
  * Add preserve text exception
  *
  * @expectedException \BadMethodCallException
  */
 public function testAddPreserveTextException()
 {
     $oCell = new Cell();
     $oCell->setDocPart('Section', 1);
     $oCell->addPreserveText('text');
 }
Exemplo n.º 3
0
 /**
  * Add preserve text exception
  *
  * @expectedException \BadMethodCallException
  */
 public function testAddPreserveTextException()
 {
     $oCell = new Cell();
     $oCell->setDocPart('Section', 1);
     $oCell->addPreserveText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'));
 }