Documentation

TOC extends Tab
in package

TOC style.

Table of Contents

Constants

TAB_LEADER_DOT  = 'dot'
TAB_LEADER_HEAVY  = 'heavy'
TAB_LEADER_HYPHEN  = 'hyphen'
TAB_LEADER_MIDDLEDOT  = 'middleDot'
TAB_LEADER_NONE  = 'none'
Tab leader types.
TAB_LEADER_UNDERSCORE  = 'underscore'
TAB_STOP_BAR  = 'bar'
TAB_STOP_CENTER  = 'center'
TAB_STOP_CLEAR  = 'clear'
Tab stop types.
TAB_STOP_DECIMAL  = 'decimal'
TAB_STOP_LEFT  = 'left'
TAB_STOP_NUM  = 'num'
TAB_STOP_RIGHT  = 'right'

Properties

$aliases  : array<string|int, mixed>
Aliases.
$index  : null|int
Index number in Style collection for named style.
$styleName  : string|null
Style name.
$indent  : float|int
Indent.
$isAuto  : bool
Is this an automatic style? (Used primarily in OpenDocument driver).
$leader  : string
Tab leader character.
$position  : float|int
Tab stop position (twip).
$type  : string
Tab stop type.

Methods

__construct()  : mixed
Create a new TOC Style.
getChildStyleValue()  : mixed
Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`.
getIndent()  : float|int
Get Indent.
getIndex()  : null|int
Get index number.
getLeader()  : string
Get leader.
getPosition()  : float|int
Get position.
getStyleName()  : string|null
Get style name.
getTabLeader()  : string
Get Tab Leader.
getTabPos()  : float|int
Get Tab Position.
getType()  : string
Get stop type.
isAuto()  : bool
Get is automatic style flag.
setAuto()  : self
Set is automatic style flag.
setIndent()  : self
Set Indent.
setIndex()  : self
Set index number.
setLeader()  : self
Set leader.
setPosition()  : self
Set position.
setStyleByArray()  : self
Set style by using associative array.
setStyleName()  : self
Set style name.
setStyleValue()  : self
Set style value template method.
setTabLeader()  : self
Set Tab Leader.
setTabPos()  : self
Set Tab Position.
setType()  : self
Set stop type.
setBoolVal()  : bool
Set bool value.
setEnumVal()  : mixed
Set enum value.
setFloatVal()  : null|float
Set float value: Convert string that contains only numeric into float.
setIntVal()  : null|int
Set integer value: Convert string that contains only numeric into integer.
setNonEmptyVal()  : string
Set default for null and empty value.
setNumericVal()  : null|float|int
Set numeric value.
setObjectVal()  : mixed
Set object value.
setPairedVal()  : self
Set $property value and set $pairProperty = false when $value = true.

Constants

TAB_LEADER_DOT

public mixed TAB_LEADER_DOT = 'dot'

TAB_LEADER_HEAVY

public mixed TAB_LEADER_HEAVY = 'heavy'

TAB_LEADER_HYPHEN

public mixed TAB_LEADER_HYPHEN = 'hyphen'

TAB_LEADER_MIDDLEDOT

public mixed TAB_LEADER_MIDDLEDOT = 'middleDot'

TAB_LEADER_NONE

Tab leader types.

public mixed TAB_LEADER_NONE = 'none'
Tags
const

string

TAB_LEADER_UNDERSCORE

public mixed TAB_LEADER_UNDERSCORE = 'underscore'

TAB_STOP_BAR

public mixed TAB_STOP_BAR = 'bar'

TAB_STOP_CENTER

public mixed TAB_STOP_CENTER = 'center'

TAB_STOP_CLEAR

Tab stop types.

public mixed TAB_STOP_CLEAR = 'clear'
Tags
const

string

TAB_STOP_DECIMAL

public mixed TAB_STOP_DECIMAL = 'decimal'

TAB_STOP_LEFT

public mixed TAB_STOP_LEFT = 'left'

TAB_STOP_NUM

public mixed TAB_STOP_NUM = 'num'

TAB_STOP_RIGHT

public mixed TAB_STOP_RIGHT = 'right'

Properties

$aliases

Aliases.

protected array<string|int, mixed> $aliases = []

$index

Index number in Style collection for named style.

protected null|int $index

This number starts from one and defined in Style::setStyleValues()

$indent

Indent.

private float|int $indent = 200

(twip)

$isAuto

Is this an automatic style? (Used primarily in OpenDocument driver).

private bool $isAuto = false
Tags
since
0.11.0

$leader

Tab leader character.

private string $leader = self::TAB_LEADER_NONE

$position

Tab stop position (twip).

private float|int $position = 0

$type

Tab stop type.

private string $type = self::TAB_STOP_CLEAR

Methods

__construct()

Create a new TOC Style.

public __construct() : mixed

getChildStyleValue()

Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`.

public getChildStyleValue(AbstractStyle $substyleObject, string $substyleProperty) : mixed
Parameters
$substyleObject : AbstractStyle
$substyleProperty : string
Tags
since
0.12.0

getIndent()

Get Indent.

public getIndent() : float|int
Return values
float|int

getIndex()

Get index number.

public getIndex() : null|int
Return values
null|int

getLeader()

Get leader.

public getLeader() : string
Return values
string

getPosition()

Get position.

public getPosition() : float|int
Return values
float|int

getStyleName()

Get style name.

public getStyleName() : string|null
Return values
string|null

getTabLeader()

Get Tab Leader.

public getTabLeader() : string
Return values
string

getTabPos()

Get Tab Position.

public getTabPos() : float|int
Return values
float|int

getType()

Get stop type.

public getType() : string
Return values
string

isAuto()

Get is automatic style flag.

public isAuto() : bool
Return values
bool

setAuto()

Set is automatic style flag.

public setAuto([bool $value = true ]) : self
Parameters
$value : bool = true
Return values
self

setIndent()

Set Indent.

public setIndent(float|int $value) : self
Parameters
$value : float|int
Return values
self

setIndex()

Set index number.

public setIndex([null|int $value = null ]) : self
Parameters
$value : null|int = null
Return values
self

setLeader()

Set leader.

public setLeader(string $value) : self
Parameters
$value : string
Return values
self

setPosition()

Set position.

public setPosition(float|int $value) : self
Parameters
$value : float|int
Return values
self

setStyleByArray()

Set style by using associative array.

public setStyleByArray([array<string|int, mixed> $values = [] ]) : self
Parameters
$values : array<string|int, mixed> = []
Return values
self

setStyleName()

Set style name.

public setStyleName(string $value) : self
Parameters
$value : string
Return values
self

setStyleValue()

Set style value template method.

public setStyleValue(string $key, array<string|int, mixed>|int|string $value) : self

Some child classes have their own specific overrides. Backward compability check for versions < 0.10.0 which use underscore prefix for their private properties. Check if the set method is exists. Throws an exception?

Parameters
$key : string
$value : array<string|int, mixed>|int|string
Return values
self

setTabLeader()

Set Tab Leader.

public setTabLeader([string $value = self::TAB_LEADER_DOT ]) : self
Parameters
$value : string = self::TAB_LEADER_DOT
Return values
self

setTabPos()

Set Tab Position.

public setTabPos(float|int $value) : self
Parameters
$value : float|int
Return values
self

setType()

Set stop type.

public setType(string $value) : self
Parameters
$value : string
Return values
self

setBoolVal()

Set bool value.

protected setBoolVal(bool $value, bool $default) : bool
Parameters
$value : bool
$default : bool
Return values
bool

setEnumVal()

Set enum value.

protected setEnumVal([mixed $value = null ][, array<string|int, mixed> $enum = [] ][, mixed $default = null ]) : mixed
Parameters
$value : mixed = null
$enum : array<string|int, mixed> = []
$default : mixed = null

setFloatVal()

Set float value: Convert string that contains only numeric into float.

protected setFloatVal(mixed $value[, null|float $default = null ]) : null|float
Parameters
$value : mixed
$default : null|float = null
Return values
null|float

setIntVal()

Set integer value: Convert string that contains only numeric into integer.

protected setIntVal(null|float|int|string $value[, null|int $default = null ]) : null|int
Parameters
$value : null|float|int|string
$default : null|int = null
Return values
null|int

setNonEmptyVal()

Set default for null and empty value.

protected setNonEmptyVal(string|null $value, string $default) : string
Parameters
$value : string|null
$default : string
Return values
string

setNumericVal()

Set numeric value.

protected setNumericVal(mixed $value[, null|float|int $default = null ]) : null|float|int
Parameters
$value : mixed
$default : null|float|int = null
Return values
null|float|int

setObjectVal()

Set object value.

protected setObjectVal(mixed $value, string $styleName, mixed &$style) : mixed
Parameters
$value : mixed
$styleName : string
$style : mixed

setPairedVal()

Set $property value and set $pairProperty = false when $value = true.

protected setPairedVal(bool &$property, bool &$pairProperty, bool $value) : self
Parameters
$property : bool
$pairProperty : bool
$value : bool
Return values
self

        
On this page

Search results