Table extends AbstractStyle
Table style writer
Tags
Table of Contents
- $style : string|AbstractStyle
- Style; set protected for a while
- $width : int
- $xmlWriter : XMLWriter
- XML writer
- __construct() : mixed
- Create new instance.
- setWidth() : mixed
- Set width.
- write() : mixed
- Write style.
- assembleStyle() : string
- Assemble style array into style string
- convertTwip() : int|float
- Convert twip value
- getStyle() : string|AbstractStyle
- Get Style
- getXmlWriter() : XMLWriter
- Get XML Writer
- writeChildStyle() : mixed
- Write child style.
- writeOnOf() : null|string
- Writes boolean as 0 or 1
- writeBorder() : mixed
- Write border.
- writeFirstRow() : mixed
- Write row style.
- writeIndent() : mixed
- writeLayout() : mixed
- Enable/Disable automatic resizing of the table
- writeMargin() : mixed
- Write margin.
- writeShading() : mixed
- Write shading.
- writeStyle() : mixed
- Write full style.
- writeTblWidth() : mixed
- Writes a table width
Properties
$style
Style; set protected for a while
protected
string|AbstractStyle
$style
$width
private
int
$width
$xmlWriter
XML writer
private
XMLWriter
$xmlWriter
Methods
__construct()
Create new instance.
public
__construct(XMLWriter $xmlWriter[, string|AbstractStyle $style = null ]) : mixed
Parameters
- $xmlWriter : XMLWriter
- $style : string|AbstractStyle = null
Return values
mixed —setWidth()
Set width.
public
setWidth([int $value = null ]) : mixed
Parameters
- $value : int = null
Return values
mixed —write()
Write style.
public
write() : mixed
Return values
mixed —assembleStyle()
Assemble style array into style string
protected
assembleStyle([array<string|int, mixed> $styles = array() ]) : string
Parameters
- $styles : array<string|int, mixed> = array()
Return values
string —convertTwip()
Convert twip value
protected
convertTwip(int|float $value, int $default) : int|float
Parameters
- $value : int|float
- $default : int
-
(int|float)
Return values
int|float —getStyle()
Get Style
protected
getStyle() : string|AbstractStyle
Return values
string|AbstractStyle —getXmlWriter()
Get XML Writer
protected
getXmlWriter() : XMLWriter
Return values
XMLWriter —writeChildStyle()
Write child style.
protected
writeChildStyle(XMLWriter $xmlWriter, string $name, mixed $value) : mixed
Parameters
- $xmlWriter : XMLWriter
- $name : string
- $value : mixed
Return values
mixed —writeOnOf()
Writes boolean as 0 or 1
protected
writeOnOf([bool $value = null ]) : null|string
Parameters
- $value : bool = null
Return values
null|string —writeBorder()
Write border.
private
writeBorder(XMLWriter $xmlWriter, Table $style) : mixed
Parameters
Return values
mixed —writeFirstRow()
Write row style.
private
writeFirstRow(XMLWriter $xmlWriter, Table $style) : mixed
Parameters
Return values
mixed —writeIndent()
private
writeIndent(XMLWriter $xmlWriter, Table $style) : mixed
Parameters
Return values
mixed —writeLayout()
Enable/Disable automatic resizing of the table
private
writeLayout(XMLWriter $xmlWriter, string $layout) : mixed
Parameters
- $xmlWriter : XMLWriter
- $layout : string
-
autofit / fixed
Return values
mixed —writeMargin()
Write margin.
private
writeMargin(XMLWriter $xmlWriter, Table $style) : mixed
Parameters
Return values
mixed —writeShading()
Write shading.
private
writeShading(XMLWriter $xmlWriter, Table $style) : mixed
Parameters
Return values
mixed —writeStyle()
Write full style.
private
writeStyle(XMLWriter $xmlWriter, Table $style) : mixed
Parameters
Return values
mixed —writeTblWidth()
Writes a table width
private
writeTblWidth(XMLWriter $xmlWriter, string $elementName, string $unit[, int|float $width = null ]) : mixed
Parameters
- $xmlWriter : XMLWriter
- $elementName : string
- $unit : string
- $width : int|float = null