PHP Класс Box\Spout\Writer\Style\Style

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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)

Открытые методы

Метод Описание
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 ( Style $baseStyle ) : Style 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 ) : Style Sets the background color
setBorder ( Box\Spout\Writer\Style\Border $border ) : Style
setFontBold ( ) : Style
setFontColor ( string $fontColor ) : Style Sets the font color.
setFontItalic ( ) : Style
setFontName ( string $fontName ) : Style
setFontSize ( integer $fontSize ) : Style
setFontStrikethrough ( ) : Style
setFontUnderline ( ) : Style
setId ( integer $id ) : Style
setShouldWrapText ( boolean | void $shouldWrap = true ) : Style
shouldApplyBackgroundColor ( ) : boolean
shouldApplyBorder ( ) : boolean
shouldApplyFont ( ) : boolean
shouldWrapText ( ) : boolean

Приватные методы

Метод Описание
mergeCellProperties ( Style $styleToUpdate, Style $baseStyle ) : void
mergeFontStyles ( Style $styleToUpdate, Style $baseStyle ) : void
mergeOtherFontProperties ( Style $styleToUpdate, Style $baseStyle ) : void

Описание методов

getBackgroundColor() публичный Метод

public getBackgroundColor ( ) : string
Результат string

getBorder() публичный Метод

public getBorder ( ) : Box\Spout\Writer\Style\Border
Результат Box\Spout\Writer\Style\Border

getFontColor() публичный Метод

public getFontColor ( ) : string
Результат string

getFontName() публичный Метод

public getFontName ( ) : string
Результат string

getFontSize() публичный Метод

public getFontSize ( ) : integer
Результат integer

getId() публичный Метод

public getId ( ) : integer | null
Результат integer | null

hasSetWrapText() публичный Метод

public hasSetWrapText ( ) : boolean
Результат boolean

isFontBold() публичный Метод

public isFontBold ( ) : boolean
Результат boolean

isFontItalic() публичный Метод

public isFontItalic ( ) : boolean
Результат boolean

isFontStrikethrough() публичный Метод

public isFontStrikethrough ( ) : boolean
Результат boolean

isFontUnderline() публичный Метод

public isFontUnderline ( ) : boolean
Результат 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
public mergeWith ( Style $baseStyle ) : Style
$baseStyle Style
Результат Style New style corresponding to the merge of the 2 styles

serialize() публичный Метод

The ID is excluded from the comparison, as we only care about actual style properties.
public serialize ( ) : string
Результат string The serialized style

setBackgroundColor() публичный Метод

Sets the background color
public setBackgroundColor ( string $color ) : Style
$color string ARGB color (@see Color)
Результат Style

setBorder() публичный Метод

public setBorder ( Box\Spout\Writer\Style\Border $border ) : Style
$border Box\Spout\Writer\Style\Border
Результат Style

setFontBold() публичный Метод

public setFontBold ( ) : Style
Результат Style

setFontColor() публичный Метод

Sets the font color.
public setFontColor ( string $fontColor ) : Style
$fontColor string ARGB color (@see Color)
Результат Style

setFontItalic() публичный Метод

public setFontItalic ( ) : Style
Результат Style

setFontName() публичный Метод

public setFontName ( string $fontName ) : Style
$fontName string Name of the font to use
Результат Style

setFontSize() публичный Метод

public setFontSize ( integer $fontSize ) : Style
$fontSize integer Font size, in pixels
Результат Style

setFontStrikethrough() публичный Метод

public setFontStrikethrough ( ) : Style
Результат Style

setFontUnderline() публичный Метод

public setFontUnderline ( ) : Style
Результат Style

setId() публичный Метод

public setId ( integer $id ) : Style
$id integer
Результат Style

setShouldWrapText() публичный Метод

public setShouldWrapText ( boolean | void $shouldWrap = true ) : Style
$shouldWrap boolean | void Should the text be wrapped
Результат Style

shouldApplyBackgroundColor() публичный Метод

public shouldApplyBackgroundColor ( ) : boolean
Результат boolean Whether the background color should be applied

shouldApplyBorder() публичный Метод

public shouldApplyBorder ( ) : boolean
Результат boolean

shouldApplyFont() публичный Метод

public shouldApplyFont ( ) : boolean
Результат boolean Whether specific font properties should be applied

shouldWrapText() публичный Метод

public shouldWrapText ( ) : boolean
Результат boolean

Описание свойств

$backgroundColor защищенное свойство

Background color
protected $backgroundColor

$border защищенное свойство

protected Border,Box\Spout\Writer\Style $border
Результат Box\Spout\Writer\Style\Border

$fontBold защищенное свойство

Whether the font should be bold
protected $fontBold

$fontColor защищенное свойство

Font color
protected $fontColor

$fontItalic защищенное свойство

Whether the font should be italic
protected $fontItalic

$fontName защищенное свойство

Font name
protected $fontName

$fontSize защищенное свойство

Font size
protected $fontSize

$fontStrikethrough защищенное свойство

Whether the font should be struck through
protected $fontStrikethrough

$fontUnderline защищенное свойство

Whether the font should be underlined
protected $fontUnderline

$hasSetBackgroundColor защищенное свойство

protected bool $hasSetBackgroundColor
Результат boolean

$hasSetFontBold защищенное свойство

Whether the bold property was set
protected $hasSetFontBold

$hasSetFontColor защищенное свойство

Whether the font color property was set
protected $hasSetFontColor

$hasSetFontItalic защищенное свойство

Whether the italic property was set
protected $hasSetFontItalic

$hasSetFontName защищенное свойство

Whether the font name property was set
protected $hasSetFontName

$hasSetFontSize защищенное свойство

Whether the font size property was set
protected $hasSetFontSize

$hasSetFontStrikethrough защищенное свойство

Whether the strikethrough property was set
protected $hasSetFontStrikethrough

$hasSetFontUnderline защищенное свойство

Whether the underline property was set
protected $hasSetFontUnderline

$hasSetWrapText защищенное свойство

Whether the wrap text property was set
protected $hasSetWrapText

$id защищенное свойство

Style ID
protected $id

$shouldApplyBorder защищенное свойство

Whether border properties should be applied
protected $shouldApplyBorder

$shouldApplyFont защищенное свойство

Whether specific font properties should be applied
protected $shouldApplyFont

$shouldWrapText защищенное свойство

Whether the text should wrap in the cell (useful for long or multi-lines text)
protected $shouldWrapText