/** * Create new table style * * @param mixed $tableStyle * @param mixed $firstRowStyle */ public function __construct($tableStyle = null, $firstRowStyle = null) { // Clone first row from table style, but with certain properties disabled if ($firstRowStyle !== null && is_array($firstRowStyle)) { $this->firstRowStyle = clone $this; $this->firstRowStyle->isFirstRow = true; unset($this->firstRowStyle->firstRowStyle); unset($this->firstRowStyle->borderInsideHSize); unset($this->firstRowStyle->borderInsideHColor); unset($this->firstRowStyle->borderInsideVSize); unset($this->firstRowStyle->borderInsideVColor); unset($this->firstRowStyle->cellMarginTop); unset($this->firstRowStyle->cellMarginLeft); unset($this->firstRowStyle->cellMarginRight); unset($this->firstRowStyle->cellMarginBottom); $this->firstRowStyle->setStyleByArray($firstRowStyle); } if ($tableStyle !== null && is_array($tableStyle)) { $this->setStyleByArray($tableStyle); } }