DIAGONAL_NONE
DIAGONAL_NONE = 0
$left : \PhpOffice\PhpSpreadsheet\Style\Border
Left.
$right : \PhpOffice\PhpSpreadsheet\Style\Border
Right.
$top : \PhpOffice\PhpSpreadsheet\Style\Border
Top.
$bottom : \PhpOffice\PhpSpreadsheet\Style\Border
Bottom.
$diagonal : \PhpOffice\PhpSpreadsheet\Style\Border
Diagonal.
$allBorders : \PhpOffice\PhpSpreadsheet\Style\Border
All borders pseudo-border. Only applies to supervisor.
$outline : \PhpOffice\PhpSpreadsheet\Style\Border
Outline pseudo-border. Only applies to supervisor.
$inside : \PhpOffice\PhpSpreadsheet\Style\Border
Inside pseudo-border. Only applies to supervisor.
$vertical : \PhpOffice\PhpSpreadsheet\Style\Border
Vertical pseudo-border. Only applies to supervisor.
$horizontal : \PhpOffice\PhpSpreadsheet\Style\Border
Horizontal pseudo-border. Only applies to supervisor.
__construct(boolean $isSupervisor = false, boolean $isConditional = false)
Create a new Borders.
boolean | $isSupervisor | Flag indicating if this is a supervisor or not Leave this value at default unless you understand exactly what its ramifications are |
boolean | $isConditional | Flag indicating if this is a conditional style or not Leave this value at default unless you understand exactly what its ramifications are |
bindParent(\PhpOffice\PhpSpreadsheet\Spreadsheet|\PhpOffice\PhpSpreadsheet\Style\Style $parent, null|string $parentPropertyName = null) : $this
Bind parent. Only used for supervisor.
\PhpOffice\PhpSpreadsheet\Spreadsheet|\PhpOffice\PhpSpreadsheet\Style\Style | $parent | |
null|string | $parentPropertyName |
getSharedComponent() : \PhpOffice\PhpSpreadsheet\Style\Borders
Get the shared style component for the currently active cell in currently active sheet.
Only used for style supervisor.
applyFromArray(array $pStyles) : $this
Apply styles from array.
$spreadsheet->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray(
[
'bottom' => [
'borderStyle' => Border::BORDER_DASHDOT,
'color' => [
'rgb' => '808080'
]
],
'top' => [
'borderStyle' => Border::BORDER_DASHDOT,
'color' => [
'rgb' => '808080'
]
]
]
);
$spreadsheet->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray(
[
'allBorders' => [
'borderStyle' => Border::BORDER_DASHDOT,
'color' => [
'rgb' => '808080'
]
]
]
);
array | $pStyles | Array containing style information |
getLeft() : \PhpOffice\PhpSpreadsheet\Style\Border
Get Left.
getRight() : \PhpOffice\PhpSpreadsheet\Style\Border
Get Right.
getTop() : \PhpOffice\PhpSpreadsheet\Style\Border
Get Top.
getBottom() : \PhpOffice\PhpSpreadsheet\Style\Border
Get Bottom.
getDiagonal() : \PhpOffice\PhpSpreadsheet\Style\Border
Get Diagonal.
getAllBorders() : \PhpOffice\PhpSpreadsheet\Style\Border
Get AllBorders (pseudo-border). Only applies to supervisor.
getOutline() : \PhpOffice\PhpSpreadsheet\Style\Border
Get Outline (pseudo-border). Only applies to supervisor.
getInside() : \PhpOffice\PhpSpreadsheet\Style\Border
Get Inside (pseudo-border). Only applies to supervisor.
getVertical() : \PhpOffice\PhpSpreadsheet\Style\Border
Get Vertical (pseudo-border). Only applies to supervisor.
getHorizontal() : \PhpOffice\PhpSpreadsheet\Style\Border
Get Horizontal (pseudo-border). Only applies to supervisor.