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
FontaddLinkStyle()
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
FontaddNumberingStyle()
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
Return values
NumberingaddParagraphStyle()
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
ParagraphaddTableStyle()
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
TableaddTitleStyle()
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
FontcountStyles()
Count styles.
public
static countStyles() : int
Tags
Return values
intgetStyle()
Get style by name.
public
static getStyle(string $styleName) : AbstractStyle|null
Parameters
- $styleName : string
Return values
AbstractStyle|null —Paragraph|Font|Table|Numbering
getStyles()
Get all styles.
public
static getStyles() : array<string|int, AbstractStyle>
Return values
array<string|int, AbstractStyle>resetStyles()
Reset styles.
public
static resetStyles() : void
Tags
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
ParagraphsetStyleValues()
Set style values and put it to static style collection.
private
static setStyleValues(string $name, AbstractStyle $style[, AbstractStyle|array<string|int, mixed> $value = null ]) : AbstractStyle
The $styleValues could be an array or object
Parameters
- $name : string
- $style : AbstractStyle
- $value : AbstractStyle|array<string|int, mixed> = null