Documentation

TablePosition extends AbstractStyle

TablePosition style

Tags
see
http://www.datypic.com/sc/ooxml/e-w_tblpPr-1.html

Table of Contents

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'
$aliases  : array<string|int, mixed>
Aliases
$index  : int|null
Index number in Style collection for named style
$styleName  : string
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
__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()  : int|null
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
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
setArrayStyle()  : self
Set style using associative array
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()  : 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

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()

$bottomFromText

Distance from bottom of table to text

private int $bottomFromText

$isAuto

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

private bool $isAuto = false
Tags
since
0.11.0

$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

$tblpY

Absolute vertical distance from anchor

private int $tblpY

$topFromText

Distance from top of table to text

private int $topFromText

Methods

__construct()

Create a new instance

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

getBottomFromText()

Get distance from bottom of table to text

public getBottomFromText() : int
Return values
int

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

getHorzAnchor()

Get table horizontal anchor

public getHorzAnchor() : string
Return values
string

getIndex()

Get index number

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

getLeftFromText()

Get distance from left of table to text

public getLeftFromText() : int
Return values
int

getRightFromText()

Get distance from right of table to text

public getRightFromText() : int
Return values
int

getStyleName()

Get style name

public getStyleName() : string
Return values
string

getTblpX()

Get absolute horizontal distance from anchor

public getTblpX() : int
Return values
int

getTblpXSpec()

Get relative horizontal alignment from anchor

public getTblpXSpec() : string
Return values
string

getTblpY()

Get absolute vertical distance from anchor

public getTblpY() : int
Return values
int

getTblpYSpec()

Get relative vertical alignment from anchor

public getTblpYSpec() : string
Return values
string

getTopFromText()

Get distance from top of table to text

public getTopFromText() : int
Return values
int

getVertAnchor()

Get table vertical anchor

public getVertAnchor() : 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

setBottomFromText()

Set distance from bottom of table to text

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

setHorzAnchor()

Set table horizontal anchor

public setHorzAnchor([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

setLeftFromText()

Set distance from left of table to text

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

setRightFromText()

Set distance from right of table to text

public setRightFromText([int $value = null ]) : self
Parameters
$value : int = null
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

setTblpX()

Set absolute horizontal distance from anchor

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

setTblpXSpec()

Set relative horizontal alignment from anchor

public setTblpXSpec([string $value = null ]) : self
Parameters
$value : string = null
Return values
self

setTblpY()

Set absolute vertical distance from anchor

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

setTblpYSpec()

Set relative vertical alignment from anchor

public setTblpYSpec([string $value = null ]) : self
Parameters
$value : string = null
Return values
self

setTopFromText()

Set distance from top of table to text

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

setVertAnchor()

Set table vertical anchor

public setVertAnchor([string $value = null ]) : self
Parameters
$value : string = null
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