Documentation

Tab extends AbstractStyle

Tab style

Table of Contents

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'
$aliases  : array<string|int, mixed>
Aliases
$index  : int|null
Index number in Style collection for named style
$styleName  : string
Style name
$isAuto  : bool
Is this an automatic style? (Used primarily in OpenDocument driver)
$leader  : string
Tab leader character
$position  : int|float
Tab stop position (twip)
$type  : string
Tab stop type
__construct()  : mixed
Create a new instance of Tab. Both $type and $leader must conform to the values put forth in the schema. If they do not they will be changed to default values.
getChildStyleValue()  : mixed
Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`
getIndex()  : int|null
Get index number
getLeader()  : string
Get leader
getPosition()  : int|float
Get position
getStyleName()  : string
Get style name
getType()  : string
Get stop type
isAuto()  : bool
Get is automatic style flag
setArrayStyle()  : self
Set style using associative array
setAuto()  : self
Set is automatic style flag
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
setType()  : self
Set stop type
setBoolVal()  : bool
Set bool value
setEnumVal()  : mixed
Set enum value
setFloatVal()  : float|null
Set float value: Convert string that contains only numeric into float
setIntVal()  : int|null
Set integer value: Convert string that contains only numeric into integer
setNonEmptyVal()  : string
Set default for null and empty value
setNumericVal()  : int|float|null
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 = array()

$index

Index number in Style collection for named style

protected int|null $index

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

$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 int|float $position = 0

$type

Tab stop type

private string $type = self::TAB_STOP_CLEAR

Methods

__construct()

Create a new instance of Tab. Both $type and $leader must conform to the values put forth in the schema. If they do not they will be changed to default values.

public __construct([string $type = null ], int $position[, string $leader = null ]) : mixed
Parameters
$type : string = null

Defaults to 'clear' if value is not possible

$position : int

Must be numeric; otherwise defaults to 0

$leader : string = null

Defaults to null if value is not possible

Return values
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
Return values
mixed

getIndex()

Get index number

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

getLeader()

Get leader

public getLeader() : string
Return values
string

getPosition()

Get position

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

getStyleName()

Get style name

public getStyleName() : string
Return values
string

getType()

Get stop type

public getType() : string
Return values
string

isAuto()

Get is automatic style flag

public isAuto() : bool
Return values
bool

setArrayStyle()

Set style using associative array

public setArrayStyle([array<string|int, mixed> $style = array() ]) : self
Parameters
$style : array<string|int, mixed> = array()
Tags
deprecated
0.11.0
codeCoverageIgnore
Return values
self

setAuto()

Set is automatic style flag

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

setIndex()

Set index number

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

setLeader()

Set leader

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

setPosition()

Set position

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

setStyleByArray()

Set style by using associative array

public setStyleByArray([array<string|int, mixed> $values = array() ]) : self
Parameters
$values : array<string|int, mixed> = array()
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, 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 : string
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 = array() ][, mixed $default = null ]) : mixed
Parameters
$value : mixed = null
$enum : array<string|int, mixed> = array()
$default : mixed = null
Tags
throws
InvalidArgumentException
Return values
mixed

setFloatVal()

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

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

setIntVal()

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

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

setNonEmptyVal()

Set default for null and empty value

protected setNonEmptyVal(string $value, string $default) : string
Parameters
$value : string

(was: mixed)

$default : string

(was: mixed)

Return values
string

(was: mixed)

setNumericVal()

Set numeric value

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

setObjectVal()

Set object value

protected setObjectVal(mixed $value, string $styleName, mixed &$style) : mixed
Parameters
$value : mixed
$styleName : string
$style : mixed
Return values
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

Search results