setStyleValue($key, $value); } /** * Set orientation */ public function setOrientation($value = null) { $enum = array(self::ORIENTATION_PORTRAIT, self::ORIENTATION_LANDSCAPE); $this->orientation = $this->setEnumVal($value, $enum, $this->orientation); $longSize = $this->pageSizeW >= $this->pageSizeH ? $this->pageSizeW : $this->pageSizeH; $shortSize = $this->pageSizeW < $this->pageSizeH ? $this->pageSizeW : $this->pageSizeH; if ($this->orientation == self::ORIENTATION_PORTRAIT) { $this->pageSizeW = $shortSize; $this->pageSizeH = $longSize; } else { $this->pageSizeW = $longSize; $this->pageSizeH = $shortSize; } } /** * Get Page Orientation * * @return string */ public function getOrientation() { return $this->orientation; } /** * Set Portrait Orientation */ public function setPortrait() { $this->setOrientation(self::ORIENTATION_PORTRAIT); } /** * Set Landscape Orientation */ public function setLandscape() { $this->setOrientation(self::ORIENTATION_LANDSCAPE); } /** * Get Page Size Width * * @return int|float */ public function getPageSizeW() { return $this->pageSizeW; } /** * Get Page Size Height * * @return int|float */ public function getPageSizeH() { return $this->pageSizeH; } /** * Get Margin Top * * @return int|float */ public function getMarginTop() { return $this->marginTop; } /** * Set Margin Top * * @param int|float $value * @return self */ public function setMarginTop($value = '') { $this->marginTop = $this->setNumericVal($value, self::DEFAULT_MARGIN); return $this; } /** * Get Margin Left * * @return int|float */ public function getMarginLeft() { return $this->marginLeft; } /** * Set Margin Left * * @param int|float $value * @return self */ public function setMarginLeft($value = '') { $this->marginLeft = $this->setNumericVal($value, self::DEFAULT_MARGIN); return $this; } /** * Get Margin Right * * @return int|float */ public function getMarginRight() { return $this->marginRight; } /** * Set Margin Right * * @param int|float $value * @return self */ public function setMarginRight($value = '') { $this->marginRight = $this->setNumericVal($value, self::DEFAULT_MARGIN); return $this; } /** * Get Margin Bottom * * @return int|float */ public function getMarginBottom() { return $this->marginBottom; } /** * Set Margin Bottom * * @param int|float $value * @return self */ public function setMarginBottom($value = '') { $this->marginBottom = $this->setNumericVal($value, self::DEFAULT_MARGIN); return $this; } /** * Get gutter * * @return int|float */ public function getGutter() { return $this->gutter; } /** * Set gutter * * @param int|float $value * @return self */ public function setGutter($value = '') { $this->gutter = $this->setNumericVal($value, self::DEFAULT_GUTTER); return $this; } /** * Get Header Height * * @return int|float */ public function getHeaderHeight() { return $this->headerHeight; } /** * Set Header Height * * @param int|float $value * @return self */ public function setHeaderHeight($value = '') { $this->headerHeight = $this->setNumericVal($value, self::DEFAULT_HEADER_HEIGHT); return $this; } /** * Get Footer Height * * @return int|float */ public function getFooterHeight() { return $this->footerHeight; } /** * Set Footer Height * * @param int|float $value * @return self */ public function setFooterHeight($value = '') { $this->footerHeight = $this->setNumericVal($value, self::DEFAULT_FOOTER_HEIGHT); return $this; } /** * Get page numbering start * * @return null|int */ public function getPageNumberingStart() { return $this->pageNumberingStart; } /** * Set page numbering start * * @param null|int $pageNumberingStart * @return $this */ public function setPageNumberingStart($pageNumberingStart = null) { $this->pageNumberingStart = $pageNumberingStart; return $this; } /** * Get Section Columns Count * * @return int */ public function getColsNum() { return $this->colsNum; } /** * Set Section Columns Count * * @param int $value * @return self */ public function setColsNum($value = '') { $this->colsNum = $this->setIntVal($value, self::DEFAULT_COLUMN_COUNT); return $this; } /** * Get Section Space Between Columns * * @return int|float */ public function getColsSpace() { return $this->colsSpace; } /** * Set Section Space Between Columns * * @param int|float $value * @return self */ public function setColsSpace($value = '') { $this->colsSpace = $this->setNumericVal($value, self::DEFAULT_COLUMN_SPACING); return $this; } /** * Get Break Type * * @return string */ public function getBreakType() { return $this->breakType; } /** * Set Break Type * * @param string $value * @return self */ public function setBreakType($value = null) { $this->breakType = $value; return $this; } /** * Get line numbering * * @return self */ public function getLineNumbering() { return $this->lineNumbering; } /** * Set line numbering * * @param array $value * @return self */ public function setLineNumbering($value = null) { if ($this->lineNumbering instanceof LineNumbering) { $this->lineNumbering->setStyleByArray($value); } else { $this->lineNumbering = new LineNumbering($value); } return $this; } /** * Remove line numbering */ public function removeLineNumbering() { $this->lineNumbering = null; } }