Styles extends BaseParserClass
Table of Contents
- $cellStyles : array<string|int, mixed>
- $namespace : string
- $styles : array<string|int, mixed>
- $styleXml : SimpleXMLElement
- $theme : Theme|null
- Theme instance.
- $workbookPalette : array<string|int, mixed>
- dxfs() : array<string|int, mixed>
- readAlignmentStyle() : void
- readBorderStyle() : void
- readColor() : string
- readFillStyle() : void
- readFontStyle() : void
- readProtectionHidden() : void
- Read protection hidden attribute.
- readProtectionLocked() : void
- Read protection locked attribute.
- readStyle() : void
- Read style.
- setNamespace() : void
- setStyleBaseData() : void
- setStyleXml() : void
- setTheme() : void
- setWorkbookPalette() : void
- styles() : array<string|int, mixed>
- boolean() : bool
- castBool() : bool
- Cast SimpleXMLElement to bool to overcome Scrutinizer problem.
- formatGeneral() : string
- getArrayItem() : stdClass
- Get array item.
- getAttribute() : string
- getStyleAttributes() : SimpleXMLElement
- readBorder() : void
- readNumberFormat() : void
Properties
$cellStyles
private
array<string|int, mixed>
$cellStyles
= []
$namespace
private
string
$namespace
= ''
$styles
private
array<string|int, mixed>
$styles
= []
$styleXml
private
SimpleXMLElement
$styleXml
$theme
Theme instance.
private
Theme|null
$theme
$workbookPalette
private
array<string|int, mixed>
$workbookPalette
= []
Methods
dxfs()
public
dxfs([bool $readDataOnly = false ]) : array<string|int, mixed>
Parameters
- $readDataOnly : bool = false
Return values
array<string|int, mixed> —readAlignmentStyle()
public
readAlignmentStyle(Alignment $alignment, SimpleXMLElement $alignmentXml) : void
Parameters
- $alignment : Alignment
- $alignmentXml : SimpleXMLElement
Return values
void —readBorderStyle()
public
readBorderStyle(Borders $borderStyle, SimpleXMLElement $borderStyleXml) : void
Parameters
- $borderStyle : Borders
- $borderStyleXml : SimpleXMLElement
Return values
void —readColor()
public
readColor(SimpleXMLElement $color[, bool $background = false ]) : string
Parameters
- $color : SimpleXMLElement
- $background : bool = false
Return values
string —readFillStyle()
public
readFillStyle(Fill $fillStyle, SimpleXMLElement $fillStyleXml) : void
Parameters
- $fillStyle : Fill
- $fillStyleXml : SimpleXMLElement
Return values
void —readFontStyle()
public
readFontStyle(Font $fontStyle, SimpleXMLElement $fontStyleXml) : void
Parameters
- $fontStyle : Font
- $fontStyleXml : SimpleXMLElement
Return values
void —readProtectionHidden()
Read protection hidden attribute.
public
readProtectionHidden(Style $docStyle, SimpleXMLElement $style) : void
Parameters
- $docStyle : Style
- $style : SimpleXMLElement
Return values
void —readProtectionLocked()
Read protection locked attribute.
public
readProtectionLocked(Style $docStyle, SimpleXMLElement $style) : void
Parameters
- $docStyle : Style
- $style : SimpleXMLElement
Return values
void —readStyle()
Read style.
public
readStyle(Style $docStyle, SimpleXMLElement|stdClass $style) : void
Parameters
- $docStyle : Style
- $style : SimpleXMLElement|stdClass
Return values
void —setNamespace()
public
setNamespace(string $namespace) : void
Parameters
- $namespace : string
Return values
void —setStyleBaseData()
public
setStyleBaseData([Theme|null $theme = null ][, array<string|int, mixed> $styles = [] ][, array<string|int, mixed> $cellStyles = [] ]) : void
Parameters
- $theme : Theme|null = null
- $styles : array<string|int, mixed> = []
- $cellStyles : array<string|int, mixed> = []
Return values
void —setStyleXml()
public
setStyleXml(SimpleXMLElement $styleXml) : void
Parameters
- $styleXml : SimpleXMLElement
Return values
void —setTheme()
public
setTheme(Theme $theme) : void
Parameters
- $theme : Theme
Return values
void —setWorkbookPalette()
public
setWorkbookPalette(array<string|int, mixed> $palette) : void
Parameters
- $palette : array<string|int, mixed>
Return values
void —styles()
public
styles() : array<string|int, mixed>
Return values
array<string|int, mixed> —boolean()
protected
static boolean(mixed $value) : bool
Parameters
- $value : mixed
Return values
bool —castBool()
Cast SimpleXMLElement to bool to overcome Scrutinizer problem.
private
static castBool(mixed $value) : bool
Parameters
- $value : mixed
Return values
bool —formatGeneral()
private
static formatGeneral(string $formatString) : string
Parameters
- $formatString : string
Return values
string —getArrayItem()
Get array item.
private
static getArrayItem(mixed $array, int $key) : stdClass
Parameters
- $array : mixed
-
(usually array, in theory can be false)
- $key : int
Return values
stdClass —getAttribute()
private
getAttribute(SimpleXMLElement $xml, string $attribute) : string
Parameters
- $xml : SimpleXMLElement
- $attribute : string
Return values
string —getStyleAttributes()
private
getStyleAttributes(SimpleXMLElement $value) : SimpleXMLElement
Parameters
- $value : SimpleXMLElement
Return values
SimpleXMLElement —readBorder()
private
readBorder(Border $border, SimpleXMLElement $borderXml) : void
Parameters
- $border : Border
- $borderXml : SimpleXMLElement
Return values
void —readNumberFormat()
private
readNumberFormat(NumberFormat $numfmtStyle, SimpleXMLElement $numfmtStyleXml) : void
Parameters
- $numfmtStyle : NumberFormat
- $numfmtStyleXml : SimpleXMLElement