class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable

PHPExcelStyleBorders

Copyright (c) 2006 - 2015 PHPExcel

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Constants

DIAGONAL_NONE

DIAGONAL_UP

DIAGONAL_DOWN

DIAGONAL_BOTH

Methods

__construct(boolean $isSupervisor = false, boolean $isConditional = false)

Create a new PHPExcelStyleBorders

bindParent($parent, $parentPropertyName = null)

Bind parent. Only used for supervisor

boolean
getIsSupervisor()

Is this a supervisor or a cell style component?

getActiveSheet()

Get the currently active sheet. Only used for supervisor

string
getSelectedCells()

Get the currently active cell coordinate in currently active sheet.

string
getActiveCell()

Get the currently active cell coordinate in currently active sheet.

__clone()

Implement PHP __clone to create a deep clone, not just a shallow copy.

getSharedComponent()

Get the shared style component for the currently active cell in currently active sheet.

array
getStyleArray(array $array)

Build style array from subcomponents

applyFromArray(array $pStyles = null)

Apply styles from array

getAllBorders()

Get AllBorders (pseudo-border). Only applies to supervisor.

boolean
getOutline()

Get Outline (pseudo-border). Only applies to supervisor.

boolean
getInside()

Get Inside (pseudo-border). Only applies to supervisor.

getVertical()

Get Vertical (pseudo-border). Only applies to supervisor.

getHorizontal()

Get Horizontal (pseudo-border). Only applies to supervisor.

int
getDiagonalDirection()

Get DiagonalDirection

setDiagonalDirection(int $pValue = PHPExcel_Style_Borders::DIAGONAL_NONE)

Set DiagonalDirection

string
getHashCode()

Get hash code

Details

at line 132
__construct(boolean $isSupervisor = false, boolean $isConditional = false)

Create a new PHPExcelStyleBorders

Parameters

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

PHPExcel_Style_Supervisor bindParent($parent, $parentPropertyName = null)

Bind parent. Only used for supervisor

Parameters

$parent
$parentPropertyName

Return Value

PHPExcel_Style_Supervisor

boolean getIsSupervisor()

Is this a supervisor or a cell style component?

Return Value

boolean

PHPExcel_Worksheet getActiveSheet()

Get the currently active sheet. Only used for supervisor

Return Value

PHPExcel_Worksheet

string getSelectedCells()

Get the currently active cell coordinate in currently active sheet.

Only used for supervisor

Return Value

string E.g. 'A1'

string getActiveCell()

Get the currently active cell coordinate in currently active sheet.

Only used for supervisor

Return Value

string E.g. 'A1'

__clone()

Implement PHP __clone to create a deep clone, not just a shallow copy.

at line 174
PHPExcel_Style_Borders getSharedComponent()

Get the shared style component for the currently active cell in currently active sheet.

Only used for style supervisor

Return Value

PHPExcel_Style_Borders

at line 185
array getStyleArray(array $array)

Build style array from subcomponents

Parameters

array $array

Return Value

array

at line 228
PHPExcel_Style_Borders applyFromArray(array $pStyles = null)

Apply styles from array

$objPHPExcel->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray( array( 'bottom' => array( 'style' => PHPExcelStyleBorder::BORDERDASHDOT, 'color' => array( 'rgb' => '808080' ) ), 'top' => array( 'style' => PHPExcelStyleBorder::BORDERDASHDOT, 'color' => array( 'rgb' => '808080' ) ) ) ); $objPHPExcel->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray( array( 'allborders' => array( 'style' => PHPExcelStyleBorder::BORDER_DASHDOT, 'color' => array( 'rgb' => '808080' ) ) ) );

Parameters

array $pStyles Array containing style information

Return Value

PHPExcel_Style_Borders

Exceptions

PHPExcel_Exception

at line 270
PHPExcel_Style_Border getLeft()

Get Left

Return Value

PHPExcel_Style_Border

at line 280
PHPExcel_Style_Border getRight()

Get Right

Return Value

PHPExcel_Style_Border

at line 290
PHPExcel_Style_Border getTop()

Get Top

Return Value

PHPExcel_Style_Border

at line 300
PHPExcel_Style_Border getBottom()

Get Bottom

Return Value

PHPExcel_Style_Border

at line 310
PHPExcel_Style_Border getDiagonal()

Get Diagonal

Return Value

PHPExcel_Style_Border

at line 321
PHPExcel_Style_Border getAllBorders()

Get AllBorders (pseudo-border). Only applies to supervisor.

Return Value

PHPExcel_Style_Border

Exceptions

PHPExcel_Exception

at line 335
boolean getOutline()

Get Outline (pseudo-border). Only applies to supervisor.

Return Value

boolean

Exceptions

PHPExcel_Exception

at line 349
boolean getInside()

Get Inside (pseudo-border). Only applies to supervisor.

Return Value

boolean

Exceptions

PHPExcel_Exception

at line 363
PHPExcel_Style_Border getVertical()

Get Vertical (pseudo-border). Only applies to supervisor.

Return Value

PHPExcel_Style_Border

Exceptions

PHPExcel_Exception

at line 377
PHPExcel_Style_Border getHorizontal()

Get Horizontal (pseudo-border). Only applies to supervisor.

Return Value

PHPExcel_Style_Border

Exceptions

PHPExcel_Exception

at line 390
int getDiagonalDirection()

Get DiagonalDirection

Return Value

int

at line 404
PHPExcel_Style_Borders setDiagonalDirection(int $pValue = PHPExcel_Style_Borders::DIAGONAL_NONE)

Set DiagonalDirection

Parameters

int $pValue

Return Value

PHPExcel_Style_Borders

at line 423
string getHashCode()

Get hash code

Return Value

string Hash code