PHP Class Box\Spout\Writer\Style\StyleBuilder

Datei anzeigen Open project: box/spout

Protected Properties

Property Type Description
$style Style to be created

Public Methods

Method Description
__construct ( )
build ( ) : Style Returns the configured style. The style is cached and can be reused.
setBackgroundColor ( string $color ) : StyleBuilder Sets a background color
setBorder ( Box\Spout\Writer\Style\Border $border ) Set a border
setFontBold ( ) : StyleBuilder Makes the font bold.
setFontColor ( string $fontColor ) : StyleBuilder Sets the font color.
setFontItalic ( ) : StyleBuilder Makes the font italic.
setFontName ( string $fontName ) : StyleBuilder Sets the font name.
setFontSize ( integer $fontSize ) : StyleBuilder Sets the font size.
setFontStrikethrough ( ) : StyleBuilder Makes the font struck through.
setFontUnderline ( ) : StyleBuilder Makes the font underlined.
setShouldWrapText ( boolean $shouldWrap = true ) : StyleBuilder Makes the text wrap in the cell if requested

Method Details

__construct() public method

public __construct ( )

build() public method

Returns the configured style. The style is cached and can be reused.
public build ( ) : Style
return Style

setBackgroundColor() public method

Sets a background color
public setBackgroundColor ( string $color ) : StyleBuilder
$color string ARGB color (@see Color)
return StyleBuilder

setBorder() public method

Set a border
public setBorder ( Box\Spout\Writer\Style\Border $border )
$border Box\Spout\Writer\Style\Border

setFontBold() public method

Makes the font bold.
public setFontBold ( ) : StyleBuilder
return StyleBuilder

setFontColor() public method

Sets the font color.
public setFontColor ( string $fontColor ) : StyleBuilder
$fontColor string ARGB color (@see Color)
return StyleBuilder

setFontItalic() public method

Makes the font italic.
public setFontItalic ( ) : StyleBuilder
return StyleBuilder

setFontName() public method

Sets the font name.
public setFontName ( string $fontName ) : StyleBuilder
$fontName string Name of the font to use
return StyleBuilder

setFontSize() public method

Sets the font size.
public setFontSize ( integer $fontSize ) : StyleBuilder
$fontSize integer Font size, in pixels
return StyleBuilder

setFontStrikethrough() public method

Makes the font struck through.
public setFontStrikethrough ( ) : StyleBuilder
return StyleBuilder

setFontUnderline() public method

Makes the font underlined.
public setFontUnderline ( ) : StyleBuilder
return StyleBuilder

setShouldWrapText() public method

Makes the text wrap in the cell if requested
public setShouldWrapText ( boolean $shouldWrap = true ) : StyleBuilder
$shouldWrap boolean Should the text be wrapped
return StyleBuilder

Property Details

$style protected_oe property

Style to be created
protected $style