class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable

PHPExcelStyleFill

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

FILL_NONE

FILL_SOLID

FILL_GRADIENT_LINEAR

FILL_GRADIENT_PATH

FILL_PATTERN_DARKDOWN

FILL_PATTERN_DARKGRAY

FILL_PATTERN_DARKGRID

FILL_PATTERN_DARKHORIZONTAL

FILL_PATTERN_DARKTRELLIS

FILL_PATTERN_DARKUP

FILL_PATTERN_DARKVERTICAL

FILL_PATTERN_GRAY0625

FILL_PATTERN_GRAY125

FILL_PATTERN_LIGHTDOWN

FILL_PATTERN_LIGHTGRAY

FILL_PATTERN_LIGHTGRID

FILL_PATTERN_LIGHTHORIZONTAL

FILL_PATTERN_LIGHTTRELLIS

FILL_PATTERN_LIGHTUP

FILL_PATTERN_LIGHTVERTICAL

FILL_PATTERN_MEDIUMGRAY

Methods

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

Create a new PHPExcelStyleFill

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
getFillType()

Get Fill Type

setFillType(string $pValue = PHPExcel_Style_Fill::FILL_NONE)

Set Fill Type

double
getRotation()

Get Rotation

setRotation(double $pValue)

Set Rotation

setStartColor(PHPExcel_Style_Color $pValue = null)

Set Start Color

setEndColor(PHPExcel_Style_Color $pValue = null)

Set End Color

string
getHashCode()

Get hash code

Details

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

Create a new PHPExcelStyleFill

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 125
PHPExcel_Style_Fill getSharedComponent()

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

Only used for style supervisor

Return Value

PHPExcel_Style_Fill

at line 136
array getStyleArray(array $array)

Build style array from subcomponents

Parameters

array $array

Return Value

array

at line 163
PHPExcel_Style_Fill applyFromArray(array $pStyles = null)

Apply styles from array

$objPHPExcel->getActiveSheet()->getStyle('B2')->getFill()->applyFromArray( array( 'type' => PHPExcelStyleFill::FILLGRADIENTLINEAR, 'rotation' => 0, 'startcolor' => array( 'rgb' => '000000' ), 'endcolor' => array( 'argb' => 'FFFFFFFF' ) ) );

Parameters

array $pStyles Array containing style information

Return Value

PHPExcel_Style_Fill

Exceptions

PHPExcel_Exception

at line 196
string getFillType()

Get Fill Type

Return Value

string

at line 210
PHPExcel_Style_Fill setFillType(string $pValue = PHPExcel_Style_Fill::FILL_NONE)

Set Fill Type

Parameters

string $pValue PHPExcelStyleFill fill type

Return Value

PHPExcel_Style_Fill

at line 226
double getRotation()

Get Rotation

Return Value

double

at line 240
PHPExcel_Style_Fill setRotation(double $pValue)

Set Rotation

Parameters

double $pValue

Return Value

PHPExcel_Style_Fill

at line 256
PHPExcel_Style_Color getStartColor()

Get Start Color

Return Value

PHPExcel_Style_Color

at line 268
PHPExcel_Style_Fill setStartColor(PHPExcel_Style_Color $pValue = null)

Set Start Color

Parameters

PHPExcel_Style_Color $pValue

Return Value

PHPExcel_Style_Fill

Exceptions

PHPExcel_Exception

at line 287
PHPExcel_Style_Color getEndColor()

Get End Color

Return Value

PHPExcel_Style_Color

at line 299
PHPExcel_Style_Fill setEndColor(PHPExcel_Style_Color $pValue = null)

Set End Color

Parameters

PHPExcel_Style_Color $pValue

Return Value

PHPExcel_Style_Fill

Exceptions

PHPExcel_Exception

at line 318
string getHashCode()

Get hash code

Return Value

string Hash code