Property | Type | Description | |
---|---|---|---|
$backgroundColor | Background color | ||
$border | Box\Spout\Writer\Style\Border | ||
$fontBold | Whether the font should be bold | ||
$fontColor | Font color | ||
$fontItalic | Whether the font should be italic | ||
$fontName | Font name | ||
$fontSize | Font size | ||
$fontStrikethrough | Whether the font should be struck through | ||
$fontUnderline | Whether the font should be underlined | ||
$hasSetBackgroundColor | boolean | ||
$hasSetFontBold | Whether the bold property was set | ||
$hasSetFontColor | Whether the font color property was set | ||
$hasSetFontItalic | Whether the italic property was set | ||
$hasSetFontName | Whether the font name property was set | ||
$hasSetFontSize | Whether the font size property was set | ||
$hasSetFontStrikethrough | Whether the strikethrough property was set | ||
$hasSetFontUnderline | Whether the underline property was set | ||
$hasSetWrapText | Whether the wrap text property was set | ||
$id | Style ID | ||
$shouldApplyBorder | Whether border properties should be applied | ||
$shouldApplyFont | Whether specific font properties should be applied | ||
$shouldWrapText | Whether the text should wrap in the cell (useful for long or multi-lines text) |
Method | Description | |
---|---|---|
getBackgroundColor ( ) : string | ||
getBorder ( ) : Box\Spout\Writer\Style\Border | ||
getFontColor ( ) : string | ||
getFontName ( ) : string | ||
getFontSize ( ) : integer | ||
getId ( ) : integer | null | ||
hasSetWrapText ( ) : boolean | ||
isFontBold ( ) : boolean | ||
isFontItalic ( ) : boolean | ||
isFontStrikethrough ( ) : boolean | ||
isFontUnderline ( ) : boolean | ||
mergeWith ( |
Merges the current style with the given style, using the given style as a base. This means that: - if current style and base style both have property A set, use current style property's value - if current style has property A set but base style does not, use current style property's value - if base style has property A set but current style does not, use base style property's value | |
serialize ( ) : string | Serializes the style for future comparison with other styles. | |
setBackgroundColor ( string $color ) : |
Sets the background color | |
setBorder ( Box\Spout\Writer\Style\Border $border ) : |
||
setFontBold ( ) : |
||
setFontColor ( string $fontColor ) : |
Sets the font color. | |
setFontItalic ( ) : |
||
setFontName ( string $fontName ) : |
||
setFontSize ( integer $fontSize ) : |
||
setFontStrikethrough ( ) : |
||
setFontUnderline ( ) : |
||
setId ( integer $id ) : |
||
setShouldWrapText ( boolean | void $shouldWrap = true ) : |
||
shouldApplyBackgroundColor ( ) : boolean | ||
shouldApplyBorder ( ) : boolean | ||
shouldApplyFont ( ) : boolean | ||
shouldWrapText ( ) : boolean |
Method | Description | |
---|---|---|
mergeCellProperties ( |
||
mergeFontStyles ( |
||
mergeOtherFontProperties ( |
public getBorder ( ) : Box\Spout\Writer\Style\Border | ||
return | Box\Spout\Writer\Style\Border |
public mergeWith ( |
||
$baseStyle | ||
return | New style corresponding to the merge of the 2 styles |
public setBackgroundColor ( string $color ) : |
||
$color | string | ARGB color (@see Color) |
return |
public setBorder ( Box\Spout\Writer\Style\Border $border ) : |
||
$border | Box\Spout\Writer\Style\Border | |
return |
public setFontColor ( string $fontColor ) : |
||
$fontColor | string | ARGB color (@see Color) |
return |
public setFontName ( string $fontName ) : |
||
$fontName | string | Name of the font to use |
return |
public setFontSize ( integer $fontSize ) : |
||
$fontSize | integer | Font size, in pixels |
return |
public setShouldWrapText ( boolean | void $shouldWrap = true ) : |
||
$shouldWrap | boolean | void | Should the text be wrapped |
return |
public shouldApplyBackgroundColor ( ) : boolean | ||
return | boolean | Whether the background color should be applied |
public shouldApplyFont ( ) : boolean | ||
return | boolean | Whether specific font properties should be applied |
protected Border,Box\Spout\Writer\Style $border | ||
return | Box\Spout\Writer\Style\Border |
protected $fontStrikethrough |
protected $hasSetFontColor |
protected $hasSetFontItalic |
protected $hasSetFontStrikethrough |
protected $hasSetFontUnderline |
protected $shouldApplyBorder |
protected $shouldApplyFont |