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