PHP 클래스 Box\Spout\Writer\Style\Style

파일 보기 프로젝트 열기: box/spout 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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