2014-03-22 10:06:08 +04:00
|
|
|
<?php
|
|
|
|
|
/**
|
2014-03-26 16:33:20 +07:00
|
|
|
* PHPWord
|
2014-03-22 10:06:08 +04:00
|
|
|
*
|
2014-03-27 23:55:06 +07:00
|
|
|
* @link https://github.com/PHPOffice/PHPWord
|
|
|
|
|
* @copyright 2014 PHPWord
|
|
|
|
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
2014-03-22 10:06:08 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
namespace PhpOffice\PhpWord\Style;
|
|
|
|
|
|
2014-04-11 21:16:07 +07:00
|
|
|
use PhpOffice\PhpWord\Shared\String;
|
|
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Table style
|
|
|
|
|
*/
|
2014-04-08 03:03:14 +07:00
|
|
|
class Table extends AbstractStyle
|
2014-03-22 10:06:08 +04:00
|
|
|
{
|
2014-03-24 11:33:20 +07:00
|
|
|
/**
|
|
|
|
|
* Style for first row
|
|
|
|
|
*
|
|
|
|
|
* @var \PhpOffice\PhpWord\Style\Table
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $firstRow = null;
|
2014-03-24 11:33:20 +07:00
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Cell margin top
|
|
|
|
|
*
|
|
|
|
|
* @var int
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $cellMarginTop = null;
|
2014-03-24 00:26:10 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Cell margin left
|
|
|
|
|
*
|
|
|
|
|
* @var int
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $cellMarginLeft = null;
|
2014-03-22 10:06:08 +04:00
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Cell margin right
|
|
|
|
|
*
|
|
|
|
|
* @var int
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $cellMarginRight = null;
|
2014-03-24 00:26:10 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Cell margin bottom
|
|
|
|
|
*
|
|
|
|
|
* @var int
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $cellMarginBottom = null;
|
2014-03-24 00:26:10 +07:00
|
|
|
|
2014-03-24 11:33:20 +07:00
|
|
|
/**
|
|
|
|
|
* Background color
|
|
|
|
|
*
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $bgColor;
|
2014-03-24 11:33:20 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Border size top
|
|
|
|
|
*
|
|
|
|
|
* @var int
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $borderTopSize;
|
2014-03-24 11:33:20 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Border color
|
|
|
|
|
*
|
|
|
|
|
* @var string top
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $borderTopColor;
|
2014-03-24 11:33:20 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Border size left
|
|
|
|
|
*
|
|
|
|
|
* @var int
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $borderLeftSize;
|
2014-03-24 11:33:20 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Border color left
|
|
|
|
|
*
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $borderLeftColor;
|
2014-03-24 11:33:20 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Border size right
|
|
|
|
|
*
|
|
|
|
|
* @var int
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $borderRightSize;
|
2014-03-24 11:33:20 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Border color right
|
|
|
|
|
*
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $borderRightColor;
|
2014-03-24 11:33:20 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Border size bottom
|
|
|
|
|
*
|
|
|
|
|
* @var int
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $borderBottomSize;
|
2014-03-24 11:33:20 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Border color bottom
|
|
|
|
|
*
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $borderBottomColor;
|
2014-03-24 11:33:20 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Border size inside horizontal
|
|
|
|
|
*
|
|
|
|
|
* @var int
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $borderInsideHSize;
|
2014-03-24 11:33:20 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Border color inside horizontal
|
|
|
|
|
*
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $borderInsideHColor;
|
2014-03-24 11:33:20 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Border size inside vertical
|
|
|
|
|
*
|
|
|
|
|
* @var int
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $borderInsideVSize;
|
2014-03-24 11:33:20 +07:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Border color inside vertical
|
|
|
|
|
*
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
2014-04-06 18:03:03 +07:00
|
|
|
private $borderInsideVColor;
|
2014-03-24 11:33:20 +07:00
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Create new table style
|
2014-03-24 11:33:20 +07:00
|
|
|
*
|
|
|
|
|
* @param mixed $styleTable
|
|
|
|
|
* @param mixed $styleFirstRow
|
2014-03-24 00:26:10 +07:00
|
|
|
*/
|
2014-03-24 11:33:20 +07:00
|
|
|
public function __construct($styleTable = null, $styleFirstRow = null)
|
2014-03-22 10:06:08 +04:00
|
|
|
{
|
2014-03-24 11:33:20 +07:00
|
|
|
if (!is_null($styleFirstRow) && is_array($styleFirstRow)) {
|
2014-04-06 18:03:03 +07:00
|
|
|
$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);
|
2014-03-24 11:33:20 +07:00
|
|
|
foreach ($styleFirstRow as $key => $value) {
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->firstRow->setStyleValue($key, $value);
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!is_null($styleTable) && is_array($styleTable)) {
|
|
|
|
|
foreach ($styleTable as $key => $value) {
|
|
|
|
|
$this->setStyleValue($key, $value);
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Set style value
|
|
|
|
|
*
|
|
|
|
|
* @param string $key
|
|
|
|
|
* @param mixed $value
|
|
|
|
|
*/
|
2014-03-22 10:06:08 +04:00
|
|
|
public function setStyleValue($key, $value)
|
|
|
|
|
{
|
2014-04-11 21:16:07 +07:00
|
|
|
$key = String::removeUnderscorePrefix($key);
|
2014-04-06 18:03:03 +07:00
|
|
|
if ($key == 'borderSize') {
|
2014-03-24 11:33:20 +07:00
|
|
|
$this->setBorderSize($value);
|
2014-04-06 18:03:03 +07:00
|
|
|
} elseif ($key == 'borderColor') {
|
2014-03-24 11:33:20 +07:00
|
|
|
$this->setBorderColor($value);
|
2014-04-06 18:03:03 +07:00
|
|
|
} elseif ($key == 'cellMargin') {
|
2014-03-24 11:33:20 +07:00
|
|
|
$this->setCellMargin($value);
|
|
|
|
|
} else {
|
|
|
|
|
$this->$key = $value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get First Row Style
|
|
|
|
|
*
|
|
|
|
|
* @return \PhpOffice\PhpWord\Style\Table
|
|
|
|
|
*/
|
|
|
|
|
public function getFirstRow()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return $this->firstRow;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get background
|
|
|
|
|
*
|
2014-04-03 10:13:13 +07:00
|
|
|
* @return string
|
2014-03-24 11:33:20 +07:00
|
|
|
*/
|
|
|
|
|
public function getBgColor()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return $this->bgColor;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set background
|
|
|
|
|
*
|
|
|
|
|
* @param string $pValue
|
|
|
|
|
* @return \PhpOffice\PhpWord\Style\Table
|
|
|
|
|
*/
|
|
|
|
|
public function setBgColor($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->bgColor = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set TLRBVH Border Size
|
|
|
|
|
*
|
|
|
|
|
* @param int $pValue Border size in eighths of a point (1/8 point)
|
|
|
|
|
*/
|
|
|
|
|
public function setBorderSize($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->borderTopSize = $pValue;
|
|
|
|
|
$this->borderLeftSize = $pValue;
|
|
|
|
|
$this->borderRightSize = $pValue;
|
|
|
|
|
$this->borderBottomSize = $pValue;
|
|
|
|
|
$this->borderInsideHSize = $pValue;
|
|
|
|
|
$this->borderInsideVSize = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get TLRBVH Border Size
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
public function getBorderSize()
|
|
|
|
|
{
|
2014-04-22 17:25:10 +07:00
|
|
|
$top = $this->getBorderTopSize();
|
|
|
|
|
$left = $this->getBorderLeftSize();
|
|
|
|
|
$right = $this->getBorderRightSize();
|
|
|
|
|
$bottom = $this->getBorderBottomSize();
|
|
|
|
|
$insideH = $this->getBorderInsideHSize();
|
|
|
|
|
$insideV = $this->getBorderInsideVSize();
|
|
|
|
|
|
|
|
|
|
return array($top, $left, $right, $bottom, $insideH, $insideV);
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set TLRBVH Border Color
|
|
|
|
|
* @param string $pValue
|
|
|
|
|
*/
|
|
|
|
|
public function setBorderColor($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->borderTopColor = $pValue;
|
|
|
|
|
$this->borderLeftColor = $pValue;
|
|
|
|
|
$this->borderRightColor = $pValue;
|
|
|
|
|
$this->borderBottomColor = $pValue;
|
|
|
|
|
$this->borderInsideHColor = $pValue;
|
|
|
|
|
$this->borderInsideVColor = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get TLRB Border Color
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
|
|
|
|
public function getBorderColor()
|
|
|
|
|
{
|
2014-04-22 17:25:10 +07:00
|
|
|
$top = $this->getBorderTopColor();
|
|
|
|
|
$left = $this->getBorderLeftColor();
|
|
|
|
|
$right = $this->getBorderRightColor();
|
|
|
|
|
$bottom = $this->getBorderBottomColor();
|
|
|
|
|
$insideH = $this->getBorderInsideHColor();
|
|
|
|
|
$insideV = $this->getBorderInsideVColor();
|
|
|
|
|
|
|
|
|
|
return array($top, $left, $right, $bottom, $insideH, $insideV);
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set border size top
|
|
|
|
|
*
|
|
|
|
|
* @param $pValue
|
|
|
|
|
*/
|
|
|
|
|
public function setBorderTopSize($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->borderTopSize = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get border size top
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public function getBorderTopSize()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return $this->borderTopSize;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set border color top
|
|
|
|
|
*
|
|
|
|
|
* @param $pValue
|
|
|
|
|
*/
|
|
|
|
|
public function setBorderTopColor($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->borderTopColor = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get border color top
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public function getBorderTopColor()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return $this->borderTopColor;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set border size left
|
|
|
|
|
*
|
|
|
|
|
* @param $pValue
|
|
|
|
|
*/
|
|
|
|
|
public function setBorderLeftSize($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->borderLeftSize = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get border size left
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public function getBorderLeftSize()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return $this->borderLeftSize;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set border color left
|
|
|
|
|
*
|
|
|
|
|
* @param $pValue
|
|
|
|
|
*/
|
|
|
|
|
public function setBorderLeftColor($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->borderLeftColor = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get border color left
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public function getBorderLeftColor()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return $this->borderLeftColor;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set border size right
|
|
|
|
|
*
|
|
|
|
|
* @param $pValue
|
|
|
|
|
*/
|
|
|
|
|
public function setBorderRightSize($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->borderRightSize = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get border size right
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public function getBorderRightSize()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return $this->borderRightSize;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set border color right
|
|
|
|
|
*
|
|
|
|
|
* @param $pValue
|
|
|
|
|
*/
|
|
|
|
|
public function setBorderRightColor($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->borderRightColor = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get border color right
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public function getBorderRightColor()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return $this->borderRightColor;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set border size bottom
|
|
|
|
|
*
|
|
|
|
|
* @param $pValue
|
|
|
|
|
*/
|
|
|
|
|
public function setBorderBottomSize($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->borderBottomSize = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get border size bottom
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public function getBorderBottomSize()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return $this->borderBottomSize;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set border color bottom
|
|
|
|
|
*
|
|
|
|
|
* @param $pValue
|
|
|
|
|
*/
|
|
|
|
|
public function setBorderBottomColor($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->borderBottomColor = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get border color bottom
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public function getBorderBottomColor()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return $this->borderBottomColor;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set border color inside horizontal
|
|
|
|
|
*
|
|
|
|
|
* @param $pValue
|
|
|
|
|
*/
|
|
|
|
|
public function setBorderInsideHColor($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->borderInsideHColor = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get border color inside horizontal
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public function getBorderInsideHColor()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return (isset($this->borderInsideHColor)) ? $this->borderInsideHColor : null;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set border color inside vertical
|
|
|
|
|
*
|
|
|
|
|
* @param $pValue
|
|
|
|
|
*/
|
|
|
|
|
public function setBorderInsideVColor($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->borderInsideVColor = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get border color inside vertical
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public function getBorderInsideVColor()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return (isset($this->borderInsideVColor)) ? $this->borderInsideVColor : null;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set border size inside horizontal
|
|
|
|
|
*
|
|
|
|
|
* @param $pValue
|
|
|
|
|
*/
|
|
|
|
|
public function setBorderInsideHSize($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->borderInsideHSize = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get border size inside horizontal
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public function getBorderInsideHSize()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return (isset($this->borderInsideHSize)) ? $this->borderInsideHSize : null;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set border size inside vertical
|
|
|
|
|
*
|
|
|
|
|
* @param $pValue
|
|
|
|
|
*/
|
|
|
|
|
public function setBorderInsideVSize($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->borderInsideVSize = $pValue;
|
2014-03-24 11:33:20 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get border size inside vertical
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public function getBorderInsideVSize()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return (isset($this->borderInsideVSize)) ? $this->borderInsideVSize : null;
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Set cell margin top
|
|
|
|
|
*
|
|
|
|
|
* @param int $pValue
|
|
|
|
|
*/
|
2014-03-22 10:06:08 +04:00
|
|
|
public function setCellMarginTop($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->cellMarginTop = $pValue;
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Get cell margin top
|
|
|
|
|
*
|
|
|
|
|
* @return int
|
|
|
|
|
*/
|
2014-03-22 10:06:08 +04:00
|
|
|
public function getCellMarginTop()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return $this->cellMarginTop;
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Set cell margin left
|
|
|
|
|
*
|
|
|
|
|
* @param int $pValue
|
|
|
|
|
*/
|
2014-03-22 10:06:08 +04:00
|
|
|
public function setCellMarginLeft($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->cellMarginLeft = $pValue;
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Get cell margin left
|
|
|
|
|
*
|
|
|
|
|
* @return int
|
|
|
|
|
*/
|
2014-03-22 10:06:08 +04:00
|
|
|
public function getCellMarginLeft()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return $this->cellMarginLeft;
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Set cell margin right
|
|
|
|
|
*
|
|
|
|
|
* @param int $pValue
|
|
|
|
|
*/
|
2014-03-22 10:06:08 +04:00
|
|
|
public function setCellMarginRight($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->cellMarginRight = $pValue;
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Get cell margin right
|
|
|
|
|
*
|
|
|
|
|
* @return int
|
|
|
|
|
*/
|
2014-03-22 10:06:08 +04:00
|
|
|
public function getCellMarginRight()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return $this->cellMarginRight;
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Set cell margin bottom
|
|
|
|
|
*
|
|
|
|
|
* @param int $pValue
|
|
|
|
|
*/
|
2014-03-22 10:06:08 +04:00
|
|
|
public function setCellMarginBottom($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->cellMarginBottom = $pValue;
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Get cell margin bottom
|
|
|
|
|
*
|
|
|
|
|
* @return int
|
|
|
|
|
*/
|
2014-03-22 10:06:08 +04:00
|
|
|
public function getCellMarginBottom()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return $this->cellMarginBottom;
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
|
2014-03-24 00:26:10 +07:00
|
|
|
/**
|
|
|
|
|
* Set TLRB cell margin
|
|
|
|
|
*
|
|
|
|
|
* @param int $pValue Margin in twips
|
|
|
|
|
*/
|
|
|
|
|
public function setCellMargin($pValue = null)
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
$this->cellMarginTop = $pValue;
|
|
|
|
|
$this->cellMarginLeft = $pValue;
|
|
|
|
|
$this->cellMarginRight = $pValue;
|
|
|
|
|
$this->cellMarginBottom = $pValue;
|
2014-03-24 00:26:10 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get cell margin
|
|
|
|
|
*
|
|
|
|
|
* @return array
|
|
|
|
|
*/
|
2014-03-22 10:06:08 +04:00
|
|
|
public function getCellMargin()
|
|
|
|
|
{
|
2014-04-06 18:03:03 +07:00
|
|
|
return array($this->cellMarginTop, $this->cellMarginLeft, $this->cellMarginRight, $this->cellMarginBottom);
|
2014-03-22 10:06:08 +04:00
|
|
|
}
|
|
|
|
|
}
|