class PHPExcel_Style_Border extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable

PHPExcelStyleBorder

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

BORDER_NONE

BORDER_DASHDOT

BORDER_DASHDOTDOT

BORDER_DASHED

BORDER_DOTTED

BORDER_DOUBLE

BORDER_HAIR

BORDER_MEDIUM

BORDER_MEDIUMDASHDOT

BORDER_MEDIUMDASHDOTDOT

BORDER_MEDIUMDASHED

BORDER_SLANTDASHDOT

BORDER_THICK

BORDER_THIN

Methods

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

Create a new PHPExcelStyleBorder

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

string
getBorderStyle()

Get Border style

setBorderStyle(string|boolean $pValue = PHPExcel_Style_Border::BORDER_NONE)

Set Border style

getColor()

Get Border Color

setColor(PHPExcel_Style_Color $pValue = null)

Set Border Color

string
getHashCode()

Get hash code

Details

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

Create a new PHPExcelStyleBorder

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

at line 107
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 121
PHPExcel_Style_Border getSharedComponent()

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

Only used for style supervisor

Return Value

PHPExcel_Style_Border

Exceptions

PHPExcel_Exception

at line 150
array getStyleArray(array $array)

Build style array from subcomponents

Parameters

array $array

Return Value

array

at line 187
PHPExcel_Style_Border applyFromArray(array $pStyles = null)

Apply styles from array

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

Parameters

array $pStyles Array containing style information

Return Value

PHPExcel_Style_Border

Exceptions

PHPExcel_Exception

at line 211
string getBorderStyle()

Get Border style

Return Value

string

at line 227
PHPExcel_Style_Border setBorderStyle(string|boolean $pValue = PHPExcel_Style_Border::BORDER_NONE)

Set Border style

Parameters

string|boolean $pValue When passing a boolean, FALSE equates PHPExcelStyleBorder::BORDERNONE and TRUE to PHPExcelStyleBorder::BORDERMEDIUM

Return Value

PHPExcel_Style_Border

at line 249
PHPExcel_Style_Color getColor()

Get Border Color

Return Value

PHPExcel_Style_Color

at line 261
PHPExcel_Style_Border setColor(PHPExcel_Style_Color $pValue = null)

Set Border Color

Parameters

PHPExcel_Style_Color $pValue

Return Value

PHPExcel_Style_Border

Exceptions

PHPExcel_Exception

at line 280
string getHashCode()

Get hash code

Return Value

string Hash code