MarginBorder extends AbstractStyle
Margin border style writer
Tags
Table of Contents
- $style : string|AbstractStyle
- Style; set protected for a while
- $attributes : array<string|int, mixed>
- Other attributes
- $colors : array<string|int, string>
- Colors
- $sizes : array<string|int, int>
- Sizes
- $styles : array<string|int, string>
- Border styles
- $xmlWriter : XMLWriter
- XML writer
- __construct() : mixed
- Create new instance.
- setAttributes() : mixed
- Set attributes.
- setColors() : mixed
- Set colors.
- setSizes() : mixed
- Set sizes.
- setStyles() : mixed
- Set border styles.
- 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
- writeSide() : mixed
- Write side.
Properties
$style
Style; set protected for a while
protected
string|AbstractStyle
$style
$attributes
Other attributes
private
array<string|int, mixed>
$attributes
= array()
$colors
Colors
private
array<string|int, string>
$colors
= array()
$sizes
Sizes
private
array<string|int, int>
$sizes
= array()
$styles
Border styles
private
array<string|int, string>
$styles
= array()
$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 —setAttributes()
Set attributes.
public
setAttributes(array<string|int, mixed> $value) : mixed
Parameters
- $value : array<string|int, mixed>
Return values
mixed —setColors()
Set colors.
public
setColors(array<string|int, string> $value) : mixed
Parameters
- $value : array<string|int, string>
Return values
mixed —setSizes()
Set sizes.
public
setSizes(array<string|int, int> $value) : mixed
Parameters
- $value : array<string|int, int>
Return values
mixed —setStyles()
Set border styles.
public
setStyles(array<string|int, string> $value) : mixed
Parameters
- $value : array<string|int, string>
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 —writeSide()
Write side.
private
writeSide(XMLWriter $xmlWriter, string $side, int $width[, string $color = null ][, string $borderStyle = 'solid' ]) : mixed
Parameters
- $xmlWriter : XMLWriter
- $side : string
- $width : int
- $color : string = null
- $borderStyle : string = 'solid'