TablePosition
extends AbstractStyle
in package
TablePosition style.
Tags
Table of Contents
Constants
- HANCHOR_MARGIN = 'margin'
- HANCHOR_PAGE = 'page'
- HANCHOR_TEXT = 'text'
- Horizontal anchor constants.
- VANCHOR_MARGIN = 'margin'
- VANCHOR_PAGE = 'page'
- VANCHOR_TEXT = 'text'
- Vertical anchor constants.
- XALIGN_CENTER = 'center'
- XALIGN_INSIDE = 'inside'
- XALIGN_LEFT = 'left'
- Horizontal alignment constants.
- XALIGN_OUTSIDE = 'outside'
- XALIGN_RIGHT = 'right'
- YALIGN_BOTTOM = 'bottom'
- YALIGN_CENTER = 'center'
- YALIGN_INLINE = 'inline'
- Vertical alignment constants.
- YALIGN_INSIDE = 'inside'
- YALIGN_OUTSIDE = 'outside'
- YALIGN_TOP = 'top'
Properties
- $aliases : array<string|int, mixed>
- Aliases.
- $index : null|int
- Index number in Style collection for named style.
- $styleName : string|null
- Style name.
- $bottomFromText : int
- Distance from bottom of table to text.
- $horzAnchor : string
- Table horizontal anchor.
- $isAuto : bool
- Is this an automatic style? (Used primarily in OpenDocument driver).
- $leftFromText : int
- Distance from left of table to text.
- $rightFromText : int
- Distance from right of table to text.
- $tblpX : int
- Absolute horizontal distance from anchor.
- $tblpXSpec : string
- Relative horizontal alignment from anchor.
- $tblpY : int
- Absolute vertical distance from anchor.
- $tblpYSpec : string
- Relative vertical alignment from anchor.
- $topFromText : int
- Distance from top of table to text.
- $vertAnchor : string
- Table vertical anchor.
Methods
- __construct() : mixed
- Create a new instance.
- getBottomFromText() : int
- Get distance from bottom of table to text.
- getChildStyleValue() : mixed
- Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`.
- getHorzAnchor() : string
- Get table horizontal anchor.
- getIndex() : null|int
- Get index number.
- getLeftFromText() : int
- Get distance from left of table to text.
- getRightFromText() : int
- Get distance from right of table to text.
- getStyleName() : string|null
- Get style name.
- getTblpX() : int
- Get absolute horizontal distance from anchor.
- getTblpXSpec() : string
- Get relative horizontal alignment from anchor.
- getTblpY() : int
- Get absolute vertical distance from anchor.
- getTblpYSpec() : string
- Get relative vertical alignment from anchor.
- getTopFromText() : int
- Get distance from top of table to text.
- getVertAnchor() : string
- Get table vertical anchor.
- isAuto() : bool
- Get is automatic style flag.
- setAuto() : self
- Set is automatic style flag.
- setBottomFromText() : self
- Set distance from bottom of table to text.
- setHorzAnchor() : self
- Set table horizontal anchor.
- setIndex() : self
- Set index number.
- setLeftFromText() : self
- Set distance from left of table to text.
- setRightFromText() : self
- Set distance from right of table to text.
- setStyleByArray() : self
- Set style by using associative array.
- setStyleName() : self
- Set style name.
- setStyleValue() : self
- Set style value template method.
- setTblpX() : self
- Set absolute horizontal distance from anchor.
- setTblpXSpec() : self
- Set relative horizontal alignment from anchor.
- setTblpY() : self
- Set absolute vertical distance from anchor.
- setTblpYSpec() : self
- Set relative vertical alignment from anchor.
- setTopFromText() : self
- Set distance from top of table to text.
- setVertAnchor() : self
- Set table vertical anchor.
- 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
HANCHOR_MARGIN
public
mixed
HANCHOR_MARGIN
= 'margin'
HANCHOR_PAGE
public
mixed
HANCHOR_PAGE
= 'page'
HANCHOR_TEXT
Horizontal anchor constants.
public
mixed
HANCHOR_TEXT
= 'text'
Tags
VANCHOR_MARGIN
public
mixed
VANCHOR_MARGIN
= 'margin'
VANCHOR_PAGE
public
mixed
VANCHOR_PAGE
= 'page'
VANCHOR_TEXT
Vertical anchor constants.
public
mixed
VANCHOR_TEXT
= 'text'
Tags
XALIGN_CENTER
public
mixed
XALIGN_CENTER
= 'center'
XALIGN_INSIDE
public
mixed
XALIGN_INSIDE
= 'inside'
XALIGN_LEFT
Horizontal alignment constants.
public
mixed
XALIGN_LEFT
= 'left'
Tags
XALIGN_OUTSIDE
public
mixed
XALIGN_OUTSIDE
= 'outside'
XALIGN_RIGHT
public
mixed
XALIGN_RIGHT
= 'right'
YALIGN_BOTTOM
public
mixed
YALIGN_BOTTOM
= 'bottom'
YALIGN_CENTER
public
mixed
YALIGN_CENTER
= 'center'
YALIGN_INLINE
Vertical alignment constants.
public
mixed
YALIGN_INLINE
= 'inline'
Tags
YALIGN_INSIDE
public
mixed
YALIGN_INSIDE
= 'inside'
YALIGN_OUTSIDE
public
mixed
YALIGN_OUTSIDE
= 'outside'
YALIGN_TOP
public
mixed
YALIGN_TOP
= 'top'
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()
$styleName
Style name.
protected
string|null
$styleName
$bottomFromText
Distance from bottom of table to text.
private
int
$bottomFromText
$horzAnchor
Table horizontal anchor.
private
string
$horzAnchor
Tags
$isAuto
Is this an automatic style? (Used primarily in OpenDocument driver).
private
bool
$isAuto
= false
Tags
$leftFromText
Distance from left of table to text.
private
int
$leftFromText
$rightFromText
Distance from right of table to text.
private
int
$rightFromText
$tblpX
Absolute horizontal distance from anchor.
private
int
$tblpX
$tblpXSpec
Relative horizontal alignment from anchor.
private
string
$tblpXSpec
Tags
$tblpY
Absolute vertical distance from anchor.
private
int
$tblpY
$tblpYSpec
Relative vertical alignment from anchor.
private
string
$tblpYSpec
Tags
$topFromText
Distance from top of table to text.
private
int
$topFromText
$vertAnchor
Table vertical anchor.
private
string
$vertAnchor
Tags
Methods
__construct()
Create a new instance.
public
__construct([array<string|int, mixed> $style = [] ]) : mixed
Parameters
- $style : array<string|int, mixed> = []
getBottomFromText()
Get distance from bottom of table to text.
public
getBottomFromText() : int
Return values
intgetChildStyleValue()
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
getHorzAnchor()
Get table horizontal anchor.
public
getHorzAnchor() : string
Return values
stringgetIndex()
Get index number.
public
getIndex() : null|int
Return values
null|intgetLeftFromText()
Get distance from left of table to text.
public
getLeftFromText() : int
Return values
intgetRightFromText()
Get distance from right of table to text.
public
getRightFromText() : int
Return values
intgetStyleName()
Get style name.
public
getStyleName() : string|null
Return values
string|nullgetTblpX()
Get absolute horizontal distance from anchor.
public
getTblpX() : int
Return values
intgetTblpXSpec()
Get relative horizontal alignment from anchor.
public
getTblpXSpec() : string
Return values
stringgetTblpY()
Get absolute vertical distance from anchor.
public
getTblpY() : int
Return values
intgetTblpYSpec()
Get relative vertical alignment from anchor.
public
getTblpYSpec() : string
Return values
stringgetTopFromText()
Get distance from top of table to text.
public
getTopFromText() : int
Return values
intgetVertAnchor()
Get table vertical anchor.
public
getVertAnchor() : string
Return values
stringisAuto()
Get is automatic style flag.
public
isAuto() : bool
Return values
boolsetAuto()
Set is automatic style flag.
public
setAuto([bool $value = true ]) : self
Parameters
- $value : bool = true
Return values
selfsetBottomFromText()
Set distance from bottom of table to text.
public
setBottomFromText([int $value = null ]) : self
Parameters
- $value : int = null
Return values
selfsetHorzAnchor()
Set table horizontal anchor.
public
setHorzAnchor([string $value = null ]) : self
Parameters
- $value : string = null
Return values
selfsetIndex()
Set index number.
public
setIndex([null|int $value = null ]) : self
Parameters
- $value : null|int = null
Return values
selfsetLeftFromText()
Set distance from left of table to text.
public
setLeftFromText([int $value = null ]) : self
Parameters
- $value : int = null
Return values
selfsetRightFromText()
Set distance from right of table to text.
public
setRightFromText([int $value = null ]) : self
Parameters
- $value : int = null
Return values
selfsetStyleByArray()
Set style by using associative array.
public
setStyleByArray([array<string|int, mixed> $values = [] ]) : self
Parameters
- $values : array<string|int, mixed> = []
Return values
selfsetStyleName()
Set style name.
public
setStyleName(string $value) : self
Parameters
- $value : string
Return values
selfsetStyleValue()
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
selfsetTblpX()
Set absolute horizontal distance from anchor.
public
setTblpX([int $value = null ]) : self
Parameters
- $value : int = null
Return values
selfsetTblpXSpec()
Set relative horizontal alignment from anchor.
public
setTblpXSpec([string $value = null ]) : self
Parameters
- $value : string = null
Return values
selfsetTblpY()
Set absolute vertical distance from anchor.
public
setTblpY([int $value = null ]) : self
Parameters
- $value : int = null
Return values
selfsetTblpYSpec()
Set relative vertical alignment from anchor.
public
setTblpYSpec([string $value = null ]) : self
Parameters
- $value : string = null
Return values
selfsetTopFromText()
Set distance from top of table to text.
public
setTopFromText([int $value = null ]) : self
Parameters
- $value : int = null
Return values
selfsetVertAnchor()
Set table vertical anchor.
public
setVertAnchor([string $value = null ]) : self
Parameters
- $value : string = null
Return values
selfsetBoolVal()
Set bool value.
protected
setBoolVal(bool $value, bool $default) : bool
Parameters
- $value : bool
- $default : bool
Return values
boolsetEnumVal()
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|floatsetIntVal()
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|intsetNonEmptyVal()
Set default for null and empty value.
protected
setNonEmptyVal(string|null $value, string $default) : string
Parameters
- $value : string|null
- $default : string
Return values
stringsetNumericVal()
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|intsetObjectVal()
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