Frame extends AbstractStyle
Frame defines the size and position of an object
Width, height, left/hpos, top/vpos, hrel, vrel, wrap, zindex
Tags
Table of Contents
- POS_ABSOLUTE = 'absolute'
- General positioning options.
- POS_BOTTOM = 'bottom'
- POS_CENTER = 'center'
- Horizontal/vertical value
- POS_INSIDE = 'inside'
- POS_LEFT = 'left'
- POS_OUTSIDE = 'outside'
- POS_RELATIVE = 'relative'
- POS_RELTO_BMARGIN = 'bottom-margin-area'
- POS_RELTO_CHAR = 'char'
- POS_RELTO_COLUMN = 'column'
- POS_RELTO_IMARGIN = 'inner-margin-area'
- POS_RELTO_LINE = 'line'
- POS_RELTO_LMARGIN = 'left-margin-area'
- POS_RELTO_MARGIN = 'margin'
- Position relative to
- POS_RELTO_OMARGIN = 'outer-margin-area'
- POS_RELTO_PAGE = 'page'
- POS_RELTO_RMARGIN = 'right-margin-area'
- POS_RELTO_TEXT = 'text'
- POS_RELTO_TMARGIN = 'top-margin-area'
- POS_RIGHT = 'right'
- POS_TOP = 'top'
- UNIT_PT = 'pt'
- Length unit
- UNIT_PX = 'px'
- WRAP_BEHIND = 'behind'
- WRAP_INFRONT = 'infront'
- WRAP_INLINE = 'inline'
- Wrap type
- WRAP_SQUARE = 'square'
- WRAP_THROUGH = 'through'
- WRAP_TIGHT = 'tight'
- WRAP_TOPBOTTOM = 'topAndBottom'
- $aliases : array<string|int, mixed>
- Aliases
- $index : int|null
- Index number in Style collection for named style
- $styleName : string
- Style name
- $alignment : string
- $height : int|float
- Height
- $hPos : string
- Horizontal position
- $hPosRelTo : string
- Horizontal position relative to
- $isAuto : bool
- Is this an automatic style? (Used primarily in OpenDocument driver)
- $left : int|float
- Leftmost (horizontal) position
- $pos : string
- Position type: absolute|relative
- $position : int
- Vertically raised or lowered text
- $top : int|float
- Topmost (vertical) position
- $unit : string
- Unit
- $vPos : string
- Vertical position
- $vPosRelTo : string
- Vertical position relative to
- $width : int|float
- Width
- $wrap : string
- Wrap type
- $wrapDistanceBottom : float
- Bottom wrap distance
- $wrapDistanceLeft : float
- Left wrap distance
- $wrapDistanceRight : float
- Right wrap distance
- $wrapDistanceTop : float
- Top wrap distance
- __construct() : mixed
- Create a new instance
- getAlign() : string
- getAlignment() : string
- getChildStyleValue() : mixed
- Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`
- getHeight() : int|float
- Get height
- getHPos() : string
- Get horizontal position
- getHPosRelTo() : string
- Get horizontal position relative to
- getIndex() : int|null
- Get index number
- getLeft() : int|float
- Get left
- getPos() : string
- Get position type
- getPosition() : int
- Get position
- getStyleName() : string
- Get style name
- getTop() : int|float
- Get topmost position
- getUnit() : string
- Get unit
- getVPos() : string
- Get vertical position
- getVPosRelTo() : string
- Get vertical position relative to
- getWidth() : int|float
- Get width
- getWrap() : string
- Get wrap type
- getWrapDistanceBottom() : float
- Get bottom distance from text wrap
- getWrapDistanceLeft() : float
- Get left distance from text wrap
- getWrapDistanceRight() : float
- Get right distance from text wrap
- getWrapDistanceTop() : float
- Get top distance from text wrap
- 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
- setHeight() : self
- Set height
- setHPos() : self
- Set horizontal position
- setHPosRelTo() : self
- Set horizontal position relative to
- setIndex() : self
- Set index number
- setLeft() : self
- Set left
- setPos() : self
- Set position type
- setPosition() : self
- Set position
- setStyleByArray() : self
- Set style by using associative array
- setStyleName() : self
- Set style name
- setStyleValue() : self
- Set style value template method
- setTop() : self
- Set topmost position
- setUnit() : self
- Set unit
- setVPos() : self
- Set vertical position
- setVPosRelTo() : self
- Set vertical position relative to
- setWidth() : self
- Set width
- setWrap() : self
- Set wrap type
- setWrapDistanceBottom() : self
- Set bottom distance from text wrap
- setWrapDistanceLeft() : self
- Set left distance from text wrap
- setWrapDistanceRight() : self
- Set right distance from text wrap
- setWrapDistanceTop() : self
- Set top distance from text wrap
- 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
POS_ABSOLUTE
General positioning options.
public
mixed
POS_ABSOLUTE
= 'absolute'
Tags
POS_BOTTOM
public
mixed
POS_BOTTOM
= 'bottom'
POS_CENTER
Horizontal/vertical value
public
mixed
POS_CENTER
= 'center'
Tags
POS_INSIDE
public
mixed
POS_INSIDE
= 'inside'
POS_LEFT
public
mixed
POS_LEFT
= 'left'
POS_OUTSIDE
public
mixed
POS_OUTSIDE
= 'outside'
POS_RELATIVE
public
mixed
POS_RELATIVE
= 'relative'
POS_RELTO_BMARGIN
public
mixed
POS_RELTO_BMARGIN
= 'bottom-margin-area'
POS_RELTO_CHAR
public
mixed
POS_RELTO_CHAR
= 'char'
POS_RELTO_COLUMN
public
mixed
POS_RELTO_COLUMN
= 'column'
POS_RELTO_IMARGIN
public
mixed
POS_RELTO_IMARGIN
= 'inner-margin-area'
POS_RELTO_LINE
public
mixed
POS_RELTO_LINE
= 'line'
POS_RELTO_LMARGIN
public
mixed
POS_RELTO_LMARGIN
= 'left-margin-area'
POS_RELTO_MARGIN
Position relative to
public
mixed
POS_RELTO_MARGIN
= 'margin'
Tags
POS_RELTO_OMARGIN
public
mixed
POS_RELTO_OMARGIN
= 'outer-margin-area'
POS_RELTO_PAGE
public
mixed
POS_RELTO_PAGE
= 'page'
POS_RELTO_RMARGIN
public
mixed
POS_RELTO_RMARGIN
= 'right-margin-area'
POS_RELTO_TEXT
public
mixed
POS_RELTO_TEXT
= 'text'
POS_RELTO_TMARGIN
public
mixed
POS_RELTO_TMARGIN
= 'top-margin-area'
POS_RIGHT
public
mixed
POS_RIGHT
= 'right'
POS_TOP
public
mixed
POS_TOP
= 'top'
UNIT_PT
Length unit
public
mixed
UNIT_PT
= 'pt'
Tags
UNIT_PX
public
mixed
UNIT_PX
= 'px'
WRAP_BEHIND
public
mixed
WRAP_BEHIND
= 'behind'
WRAP_INFRONT
public
mixed
WRAP_INFRONT
= 'infront'
WRAP_INLINE
Wrap type
public
mixed
WRAP_INLINE
= 'inline'
Tags
WRAP_SQUARE
public
mixed
WRAP_SQUARE
= 'square'
WRAP_THROUGH
public
mixed
WRAP_THROUGH
= 'through'
WRAP_TIGHT
public
mixed
WRAP_TIGHT
= 'tight'
WRAP_TOPBOTTOM
public
mixed
WRAP_TOPBOTTOM
= 'topAndBottom'
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
private
string
$alignment
= ''
$height
Height
private
int|float
$height
$hPos
Horizontal position
private
string
$hPos
$hPosRelTo
Horizontal position relative to
private
string
$hPosRelTo
$isAuto
Is this an automatic style? (Used primarily in OpenDocument driver)
private
bool
$isAuto
= false
Tags
$left
Leftmost (horizontal) position
private
int|float
$left
= 0
$pos
Position type: absolute|relative
private
string
$pos
$position
Vertically raised or lowered text
private
int
$position
Tags
$top
Topmost (vertical) position
private
int|float
$top
= 0
$unit
Unit
private
string
$unit
= 'pt'
$vPos
Vertical position
private
string
$vPos
$vPosRelTo
Vertical position relative to
private
string
$vPosRelTo
$width
Width
private
int|float
$width
$wrap
Wrap type
private
string
$wrap
$wrapDistanceBottom
Bottom wrap distance
private
float
$wrapDistanceBottom
$wrapDistanceLeft
Left wrap distance
private
float
$wrapDistanceLeft
$wrapDistanceRight
Right wrap distance
private
float
$wrapDistanceRight
$wrapDistanceTop
Top wrap distance
private
float
$wrapDistanceTop
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 —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 —getHeight()
Get height
public
getHeight() : int|float
Return values
int|float —getHPos()
Get horizontal position
public
getHPos() : string
Return values
string —getHPosRelTo()
Get horizontal position relative to
public
getHPosRelTo() : string
Return values
string —getIndex()
Get index number
public
getIndex() : int|null
Return values
int|null —getLeft()
Get left
public
getLeft() : int|float
Return values
int|float —getPos()
Get position type
public
getPos() : string
Return values
string —getPosition()
Get position
public
getPosition() : int
Return values
int —getStyleName()
Get style name
public
getStyleName() : string
Return values
string —getTop()
Get topmost position
public
getTop() : int|float
Return values
int|float —getUnit()
Get unit
public
getUnit() : string
Return values
string —getVPos()
Get vertical position
public
getVPos() : string
Return values
string —getVPosRelTo()
Get vertical position relative to
public
getVPosRelTo() : string
Return values
string —getWidth()
Get width
public
getWidth() : int|float
Return values
int|float —getWrap()
Get wrap type
public
getWrap() : string
Return values
string —getWrapDistanceBottom()
Get bottom distance from text wrap
public
getWrapDistanceBottom() : float
Return values
float —getWrapDistanceLeft()
Get left distance from text wrap
public
getWrapDistanceLeft() : float
Return values
float —getWrapDistanceRight()
Get right distance from text wrap
public
getWrapDistanceRight() : float
Return values
float —getWrapDistanceTop()
Get top distance from text wrap
public
getWrapDistanceTop() : float
Return values
float —isAuto()
Get is automatic style flag
public
isAuto() : bool
Return values
bool —setAlign()
public
setAlign([string $value = null ]) : self
Parameters
- $value : string = null
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 —setHeight()
Set height
public
setHeight([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setHPos()
Set horizontal position
public
setHPos(string $value) : self
Parameters
- $value : string
Tags
Return values
self —setHPosRelTo()
Set horizontal position relative to
public
setHPosRelTo(string $value) : self
Parameters
- $value : string
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|float $value) : self
Parameters
- $value : int|float
Return values
self —setPos()
Set position type
public
setPos(string $value) : self
Parameters
- $value : string
Return values
self —setPosition()
Set position
public
setPosition([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 —setTop()
Set topmost position
public
setTop(int|float $value) : self
Parameters
- $value : int|float
Return values
self —setUnit()
Set unit
public
setUnit(string $value) : self
Parameters
- $value : string
Return values
self —setVPos()
Set vertical position
public
setVPos(string $value) : self
Parameters
- $value : string
Tags
Return values
self —setVPosRelTo()
Set vertical position relative to
public
setVPosRelTo(string $value) : self
Parameters
- $value : string
Return values
self —setWidth()
Set width
public
setWidth([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setWrap()
Set wrap type
public
setWrap(string $value) : self
Parameters
- $value : string
Return values
self —setWrapDistanceBottom()
Set bottom distance from text wrap
public
setWrapDistanceBottom([float $value = null ]) : self
Parameters
- $value : float = null
Return values
self —setWrapDistanceLeft()
Set left distance from text wrap
public
setWrapDistanceLeft([float $value = null ]) : self
Parameters
- $value : float = null
Return values
self —setWrapDistanceRight()
Set right distance from text wrap
public
setWrapDistanceRight([float $value = null ]) : self
Parameters
- $value : float = null
Return values
self —setWrapDistanceTop()
Set top distance from text wrap
public
setWrapDistanceTop([int $value = null ]) : self
Parameters
- $value : int = 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
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