PHPExcel_Style

# Class: PHPExcel_Style Source Location: /PHPExcel/Style.php
### Class Overview
PHPExcel_Style #### Author(s): #### Copyright: Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel) Implements interfaces: PHPExcel_IComparable | ### Variables $_alignment $_borders $_conditionalStyles $_fill $_font $_index $_isSupervisor $_numberFormat $_parent $_protection | ### Methods __construct applyFromArray bindParent getActiveCell getActiveSheet getAlignment getBorders getConditionalStyles getFill getFont getHashCode getIndex getIsSupervisor getNumberFormat getParent getProtection getSelectedCells getSharedComponent setConditionalStyles setFont setIndex __clone
### Class Details [line 71] PHPExcel_Style PHPExcel_Style #### Tags:
copyright: | Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
[ Top ] ### Class Variables #### $_alignment = [line 99] Alignment Alignment #### Tags:
access: | private
Type: | PHPExcel_Style_Alignment
[ Top ] #### $_borders = [line 92] Borders Borders #### Tags:
access: | private
Type: | PHPExcel_Style_Borders
[ Top ] #### $_conditionalStyles = [line 113] Conditional styles Conditional styles #### Tags:
access: | private
Type: | PHPExcel_Style_Conditional[]
[ Top ] #### $_fill = [line 85] Fill Fill #### Tags:
access: | private
Type: | PHPExcel_Style_Fill
[ Top ] #### $_font = [line 78] Font Font #### Tags:
access: | private
Type: | PHPExcel_Style_Font
[ Top ] #### $_index = [line 141] Index of style in collection. Index of style in collection. Only used for real style. #### Tags:
access: | private
Type: | int
[ Top ] #### $_isSupervisor = [line 127] Style supervisor? Style supervisor? #### Tags:
access: | private
Type: | boolean
[ Top ] #### $_numberFormat = [line 106] Number Format Number Format #### Tags:
access: | private
Type: | PHPExcel_Style_NumberFormat
[ Top ] #### $_parent = [line 134] Parent. Parent. Only used for style supervisor #### Tags:
access: | private
Type: | PHPExcel
[ Top ] #### $_protection = [line 120] Protection Protection #### Tags:
access: | private
Type: | PHPExcel_Style_Protection
[ Top ] ### Class Methods ### constructor __construct [line 148]
`PHPExcel_Style __construct( [boolean $isSupervisor = false])`
Create a new PHPExcel_Style Create a new PHPExcel_Style #### Tags:
access: | public
#### Parameters:
boolean | $isSupervisor |
[ Top ] ### method applyFromArray [line 298]
`PHPExcel_Style applyFromArray( [array $pStyles = null], [boolean $pAdvanced = true])`
Apply styles from array Apply styles from array $objPHPExcel->getActiveSheet()->getStyle('B2')->applyFromArray( array( 'font' => array( 'name' => 'Arial', 'bold' => true, 'italic' => false, 'underline' => PHPExcel_Style_Font::UNDERLINE_DOUBLE, 'strike' => false, 'color' => array( 'rgb' => '808080' ) ), 'borders' => array( 'bottom' => array( 'style' => PHPExcel_Style_Border::BORDER_DASHDOT, 'color' => array( 'rgb' => '808080' ) ), 'top' => array( 'style' => PHPExcel_Style_Border::BORDER_DASHDOT, 'color' => array( 'rgb' => '808080' ) ) ) ) ); #### Tags:
throws: | Exception
access: | public
#### Parameters:
array | $pStyles | Array containing style information
boolean | $pAdvanced | Advanced mode for setting borders.
[ Top ] ### method bindParent [line 179]
`PHPExcel_Style bindParent( PHPExcel $parent)`
Bind parent. Bind parent. Only used for supervisor #### Tags:
access: | public
#### Parameters:
PHPExcel | $parent |
[ Top ] ### method getActiveCell [line 244]
`string getActiveCell( )`
Get the currently active cell coordinate in currently active sheet. Get the currently active cell coordinate in currently active sheet. Only used for supervisor #### Tags:
return: | E.g. 'A1'
access: | public
[ Top ] ### method getActiveSheet [line 222]
`PHPExcel_Worksheet getActiveSheet( )`
Get the currently active sheet. Get the currently active sheet. Only used for supervisor #### Tags:
access: | public
[ Top ] ### method getAlignment [line 618]
`PHPExcel_Style_Alignment getAlignment( )`
Get Alignment Get Alignment #### Tags:
access: | public
[ Top ] ### method getBorders [line 609]
`PHPExcel_Style_Borders getBorders( )`
Get Borders Get Borders #### Tags:
access: | public
[ Top ] ### method getConditionalStyles [line 636]
`PHPExcel_Style_Conditional[] getConditionalStyles( )`
Get Conditional Styles. Get Conditional Styles. Only used on supervisor. #### Tags:
access: | public
[ Top ] ### method getFill [line 579]
`PHPExcel_Style_Fill getFill( )`
Get Fill Get Fill #### Tags:
access: | public
[ Top ] ### method getFont [line 588]
`PHPExcel_Style_Font getFont( )`
Get Font Get Font #### Tags:
access: | public
[ Top ] ### method getHashCode [line 669]
`string getHashCode( )`
Get hash code Get hash code #### Tags:
return: | Hash code
access: | public
[ Top ] ### method getIndex [line 692]
`int getIndex( )`
Get own index in style collection Get own index in style collection #### Tags:
access: | public
[ Top ] ### method getIsSupervisor [line 190]
`boolean getIsSupervisor( )`
Is this a supervisor or a real style component? Is this a supervisor or a real style component? #### Tags:
access: | public
[ Top ] ### method getNumberFormat [line 627]
`PHPExcel_Style_NumberFormat getNumberFormat( )`
Get Number Format Get Number Format #### Tags:
access: | public
[ Top ] ### method getParent [line 254]
`PHPExcel getParent( )`
Get parent. Get parent. Only used for style supervisor #### Tags:
access: | public
[ Top ] ### method getProtection [line 660]
`PHPExcel_Style_Protection getProtection( )`
Get Protection Get Protection #### Tags:
access: | public
[ Top ] ### method getSelectedCells [line 233]
`string getSelectedCells( )`
Get the currently active cell coordinate in currently active sheet. Get the currently active cell coordinate in currently active sheet. Only used for supervisor #### Tags:
return: | E.g. 'A1'
access: | public
[ Top ] ### method getSharedComponent [line 201]
`PHPExcel_Style getSharedComponent( )`
Get the shared style component for the currently active cell in currently active sheet. Get the shared style component for the currently active cell in currently active sheet. Only used for style supervisor #### Tags:
access: | public
[ Top ] ### method setConditionalStyles [line 646]
`PHPExcel_Style setConditionalStyles( [PHPExcel_Style_Conditional[] $pValue = null])`
Set Conditional Styles. Set Conditional Styles. Only used on supervisor. #### Tags:
access: | public
#### Parameters:
PHPExcel_Style_Conditional[] | $pValue | Array of condtional styles
[ Top ] ### method setFont [line 598]
`PHPExcel_Style setFont( PHPExcel_Style_Font $font)`
Set font Set font #### Tags:
access: | public
#### Parameters:
PHPExcel_Style_Font | $font |
[ Top ] ### method setIndex [line 702]
`void setIndex( int $pValue)`
Set own index in style collection Set own index in style collection #### Tags:
access: | public
#### Parameters:
int | $pValue |
[ Top ] ### method __clone [line 710]
`void __clone( )`
Implement PHP __clone to create a deep clone, not just a shallow copy. Implement PHP __clone to create a deep clone, not just a shallow copy. #### Tags:
access: | public
[ Top ] Documentation generated on Mon, 11 Jan 2010 08:14:21 +0100 by phpDocumentor 1.4.1