Beispiel #1
0
 /**
  * Create a new TableFull Font
  */
 public function __construct($styleTable = null, $styleFirstRow = null, $styleLastRow = null)
 {
     if (!is_null($styleFirstRow) && is_array($styleFirstRow)) {
         $this->_firstRow = clone $this;
         unset($this->_firstRow->_firstRow);
         unset($this->_firstRow->_cellMarginBottom);
         unset($this->_firstRow->_cellMarginTop);
         unset($this->_firstRow->_cellMarginLeft);
         unset($this->_firstRow->_cellMarginRight);
         unset($this->_firstRow->_borderInsideVColor);
         unset($this->_firstRow->_borderInsideVSize);
         unset($this->_firstRow->_borderInsideHColor);
         unset($this->_firstRow->_borderInsideHSize);
         unset($this->_firstRow->_alignMent);
         unset($this->_firstRow->_tableIndent);
         foreach ($styleFirstRow as $key => $value) {
             if (substr($key, 0, 1) != '_') {
                 $key = '_' . $key;
             }
             $this->_firstRow->setStyleValue($key, $value);
         }
     }
     if (!is_null($styleTable) && is_array($styleTable)) {
         foreach ($styleTable as $key => $value) {
             if (substr($key, 0, 1) != '_') {
                 $key = '_' . $key;
             }
             $this->setStyleValue($key, $value);
         }
     }
 }
Beispiel #2
0
 /**
  * Create a new table
  *
  * @param string $insideOf
  * @param int $pCount
  * @param mixed $style
  */
 public function __construct($insideOf, $pCount, $style = null)
 {
     $this->_insideOf = $insideOf;
     $this->_pCount = $pCount;
     if (!is_null($style)) {
         if (is_array($style)) {
             $this->_style = new PHPWord_Style_Table();
             foreach ($style as $key => $value) {
                 if (substr($key, 0, 1) != '_') {
                     $key = '_' . $key;
                 }
                 $this->_style->setStyleValue($key, $value);
             }
         } else {
             $this->_style = $style;
         }
     }
 }
Beispiel #3
0
 /**
  * Create a new table
  * 
  * @param string $insideOf
  * @param int $pCount
  * @param mixed $style
  */
 public function __construct($insideOf, $pCount, $style = null)
 {
     $this->_insideOf = $insideOf;
     $this->_pCount = $pCount;
     if (is_null($style)) {
         return;
     }
     if (!is_array($style)) {
         $this->_style = $style;
         return;
     }
     require_once 'Document/Word/Writer/Style/Table.php';
     $this->_style = new Document_Word_Writer_Style_Table();
     foreach ($style as $key => $value) {
         if (substr($key, 0, 1) != '_') {
             $key = '_' . $key;
         }
         $this->_style->setStyleValue($key, $value);
     }
 }