NumberingLevel extends AbstractStyle
Numbering level definition
Tags
Table of Contents
- $aliases : array<string|int, mixed>
- Aliases
- $index : int|null
- Index number in Style collection for named style
- $styleName : string
- Style name
- $alignment : mixed
- Justification, w:lvlJc
- $font : string
- Font family
- $format : string
- Numbering format w:numFmt, one of PhpOffice\PhpWord\SimpleType\NumberFormat
- $hanging : int
- Hanging
- $hint : string
- Hint default|eastAsia|cs
- $isAuto : bool
- Is this an automatic style? (Used primarily in OpenDocument driver)
- $left : int
- Left
- $level : int
- Level number, 0 to 8 (total 9 levels)
- $pStyle : string
- Related paragraph style
- $restart : int
- Restart numbering level symbol w:lvlRestart
- $start : int
- Starting value w:start
- $suffix : string
- Content between numbering symbol and paragraph text w:suff
- $tabPos : int
- Tab position
- $text : string
- Numbering level text e.g. %1 for nonbullet or bullet character
- getAlign() : string
- getAlignment() : string
- getChildStyleValue() : mixed
- Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`
- getFont() : string
- Get font
- getFormat() : string
- Get format
- getHanging() : int
- Get hanging
- getHint() : string
- Get hint
- getIndex() : int|null
- Get index number
- getLeft() : int
- Get left
- getLevel() : int
- Get level
- getPStyle() : string
- Get related paragraph style
- getRestart() : int
- Get restart
- getStart() : int
- Get start
- getStyleName() : string
- Get style name
- getSuffix() : string
- Get suffix
- getTabPos() : int
- Get tab
- getText() : string
- Get text
- isAuto() : bool
- Get is automatic style flag
- setAlign() : self
- setAlignment() : self
- setArrayStyle() : self
- Set style using associative array
- setAuto() : self
- Set is automatic style flag
- setFont() : self
- Set font
- setFormat() : self
- Set format
- setHanging() : self
- Set hanging
- setHint() : self
- Set hint
- setIndex() : self
- Set index number
- setLeft() : self
- Set left
- setLevel() : self
- Set level
- setPStyle() : self
- Set related paragraph style
- setRestart() : self
- Set restart
- setStart() : self
- Set start
- setStyleByArray() : self
- Set style by using associative array
- setStyleName() : self
- Set style name
- setStyleValue() : self
- Set style value template method
- setSuffix() : self
- Set suffix
- setTabPos() : self
- Set tab
- setText() : self
- Set text
- 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
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()
$styleName
Style name
protected
string
$styleName
$alignment
Justification, w:lvlJc
private
mixed
$alignment
= ''
$font
Font family
private
string
$font
$format
Numbering format w:numFmt, one of PhpOffice\PhpWord\SimpleType\NumberFormat
private
string
$format
Tags
$hanging
Hanging
private
int
$hanging
$hint
Hint default|eastAsia|cs
private
string
$hint
Tags
$isAuto
Is this an automatic style? (Used primarily in OpenDocument driver)
private
bool
$isAuto
= false
Tags
$left
Left
private
int
$left
$level
Level number, 0 to 8 (total 9 levels)
private
int
$level
= 0
$pStyle
Related paragraph style
private
string
$pStyle
Tags
$restart
Restart numbering level symbol w:lvlRestart
private
int
$restart
Tags
$start
Starting value w:start
private
int
$start
= 1
Tags
$suffix
Content between numbering symbol and paragraph text w:suff
private
string
$suffix
= 'tab'
Tags
$tabPos
Tab position
private
int
$tabPos
$text
Numbering level text e.g. %1 for nonbullet or bullet character
private
string
$text
Tags
Methods
getAlign()
public
getAlign() : string
Tags
Return values
string —getAlignment()
public
getAlignment() : string
Tags
Return values
string —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
Return values
mixed —getFont()
Get font
public
getFont() : string
Return values
string —getFormat()
Get format
public
getFormat() : string
Return values
string —getHanging()
Get hanging
public
getHanging() : int
Return values
int —getHint()
Get hint
public
getHint() : string
Return values
string —getIndex()
Get index number
public
getIndex() : int|null
Return values
int|null —getLeft()
Get left
public
getLeft() : int
Return values
int —getLevel()
Get level
public
getLevel() : int
Return values
int —getPStyle()
Get related paragraph style
public
getPStyle() : string
Return values
string —getRestart()
Get restart
public
getRestart() : int
Return values
int —getStart()
Get start
public
getStart() : int
Return values
int —getStyleName()
Get style name
public
getStyleName() : string
Return values
string —getSuffix()
Get suffix
public
getSuffix() : string
Return values
string —getTabPos()
Get tab
public
getTabPos() : int
Return values
int —getText()
Get text
public
getText() : string
Return values
string —isAuto()
Get is automatic style flag
public
isAuto() : bool
Return values
bool —setAlign()
public
setAlign(string $value) : self
Parameters
- $value : string
Tags
Return values
self —setAlignment()
public
setAlignment(string $value) : self
Parameters
- $value : string
Tags
Return values
self —setArrayStyle()
Set style using associative array
public
setArrayStyle([array<string|int, mixed> $style = array() ]) : self
Parameters
- $style : array<string|int, mixed> = array()
Tags
Return values
self —setAuto()
Set is automatic style flag
public
setAuto([bool $value = true ]) : self
Parameters
- $value : bool = true
Return values
self —setFont()
Set font
public
setFont(string $value) : self
Parameters
- $value : string
Return values
self —setFormat()
Set format
public
setFormat(string $value) : self
Parameters
- $value : string
Return values
self —setHanging()
Set hanging
public
setHanging(int $value) : self
Parameters
- $value : int
Return values
self —setHint()
Set hint
public
setHint([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setIndex()
Set index number
public
setIndex([int|null $value = null ]) : self
Parameters
- $value : int|null = null
Return values
self —setLeft()
Set left
public
setLeft(int $value) : self
Parameters
- $value : int
Return values
self —setLevel()
Set level
public
setLevel(int $value) : self
Parameters
- $value : int
Return values
self —setPStyle()
Set related paragraph style
public
setPStyle(string $value) : self
Parameters
- $value : string
Return values
self —setRestart()
Set restart
public
setRestart(int $value) : self
Parameters
- $value : int
Return values
self —setStart()
Set start
public
setStart(int $value) : self
Parameters
- $value : int
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 —setSuffix()
Set suffix
public
setSuffix(string $value) : self
Parameters
- $value : string
Return values
self —setTabPos()
Set tab
public
setTabPos(int $value) : self
Parameters
- $value : int
Return values
self —setText()
Set text
public
setText(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
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