Documentation

Style
in package

Style collection.

Table of Contents

Properties

$styles  : array<string|int, mixed>
Style register.

Methods

addFontStyle()  : Font
Add font style.
addLinkStyle()  : Font
Add link style.
addNumberingStyle()  : Numbering
Add numbering style.
addParagraphStyle()  : Paragraph
Add paragraph style.
addTableStyle()  : Table
Add table style.
addTitleStyle()  : Font
Add title style.
countStyles()  : int
Count styles.
getStyle()  : AbstractStyle|null
Get style by name.
getStyles()  : array<string|int, AbstractStyle>
Get all styles.
resetStyles()  : void
Reset styles.
setDefaultParagraphStyle()  : Paragraph
Set default paragraph style.
setStyleValues()  : AbstractStyle
Set style values and put it to static style collection.

Properties

$styles

Style register.

private static array<string|int, mixed> $styles = []

Methods

addFontStyle()

Add font style.

public static addFontStyle(string $styleName, AbstractStyle|array<string|int, mixed> $fontStyle[, AbstractStyle|array<string|int, mixed> $paragraphStyle = null ]) : Font
Parameters
$styleName : string
$fontStyle : AbstractStyle|array<string|int, mixed>
$paragraphStyle : AbstractStyle|array<string|int, mixed> = null
Return values
Font

addLinkStyle()

Add link style.

public static addLinkStyle(string $styleName, AbstractStyle|array<string|int, mixed> $styles) : Font
Parameters
$styleName : string
$styles : AbstractStyle|array<string|int, mixed>
Return values
Font

addNumberingStyle()

Add numbering style.

public static addNumberingStyle(string $styleName, AbstractStyle|array<string|int, mixed> $styleValues) : Numbering
Parameters
$styleName : string
$styleValues : AbstractStyle|array<string|int, mixed>
Tags
since
0.10.0
Return values
Numbering

addParagraphStyle()

Add paragraph style.

public static addParagraphStyle(string $styleName, AbstractStyle|array<string|int, mixed> $styles) : Paragraph
Parameters
$styleName : string
$styles : AbstractStyle|array<string|int, mixed>
Return values
Paragraph

addTableStyle()

Add table style.

public static addTableStyle(string $styleName, array<string|int, mixed> $styleTable[, null|array<string|int, mixed> $styleFirstRow = null ]) : Table
Parameters
$styleName : string
$styleTable : array<string|int, mixed>
$styleFirstRow : null|array<string|int, mixed> = null
Return values
Table

addTitleStyle()

Add title style.

public static addTitleStyle(null|int $depth, AbstractStyle|array<string|int, mixed> $fontStyle[, AbstractStyle|array<string|int, mixed> $paragraphStyle = null ]) : Font
Parameters
$depth : null|int

Provide null to set title font

$fontStyle : AbstractStyle|array<string|int, mixed>
$paragraphStyle : AbstractStyle|array<string|int, mixed> = null
Return values
Font

countStyles()

Count styles.

public static countStyles() : int
Tags
since
0.10.0
Return values
int

getStyle()

Get style by name.

public static getStyle(string $styleName) : AbstractStyle|null
Parameters
$styleName : string
Return values
AbstractStyle|null

Paragraph|Font|Table|Numbering

resetStyles()

Reset styles.

public static resetStyles() : void
Tags
since
0.10.0

setDefaultParagraphStyle()

Set default paragraph style.

public static setDefaultParagraphStyle(AbstractStyle|array<string|int, mixed> $styles) : Paragraph
Parameters
$styles : AbstractStyle|array<string|int, mixed>

Paragraph style definition

Return values
Paragraph

        
On this page

Search results