Styles
extends BaseParserClass
in package
Table of Contents
Properties
- $cellStyles : array<string|int, mixed>
- $namespace : string
- $styles : array<string|int, mixed>
- $styleXml : SimpleXMLElement
- $theme : Theme|null
- Theme instance.
- $workbookPalette : array<string|int, mixed>
Methods
- 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
- formatGeneral() : string
- getArrayItem() : SimpleXMLElement|null
- 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
= null
$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
readBorderStyle()
public
readBorderStyle(Borders $borderStyle, SimpleXMLElement $borderStyleXml) : void
Parameters
- $borderStyle : Borders
- $borderStyleXml : SimpleXMLElement
readColor()
public
readColor(SimpleXMLElement $color[, bool $background = false ]) : string
Parameters
- $color : SimpleXMLElement
- $background : bool = false
Return values
stringreadFillStyle()
public
readFillStyle(Fill $fillStyle, SimpleXMLElement $fillStyleXml) : void
Parameters
- $fillStyle : Fill
- $fillStyleXml : SimpleXMLElement
readFontStyle()
public
readFontStyle(Font $fontStyle, SimpleXMLElement $fontStyleXml) : void
Parameters
- $fontStyle : Font
- $fontStyleXml : SimpleXMLElement
readProtectionHidden()
Read protection hidden attribute.
public
readProtectionHidden(Style $docStyle, SimpleXMLElement $style) : void
Parameters
- $docStyle : Style
- $style : SimpleXMLElement
readProtectionLocked()
Read protection locked attribute.
public
readProtectionLocked(Style $docStyle, SimpleXMLElement $style) : void
Parameters
- $docStyle : Style
- $style : SimpleXMLElement
readStyle()
Read style.
public
readStyle(Style $docStyle, SimpleXMLElement|stdClass $style) : void
Parameters
- $docStyle : Style
- $style : SimpleXMLElement|stdClass
setNamespace()
public
setNamespace(string $namespace) : void
Parameters
- $namespace : string
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> = []
setStyleXml()
public
setStyleXml(SimpleXMLElement $styleXml) : void
Parameters
- $styleXml : SimpleXMLElement
setTheme()
public
setTheme(Theme $theme) : void
Parameters
- $theme : Theme
setWorkbookPalette()
public
setWorkbookPalette(array<string|int, mixed> $palette) : void
Parameters
- $palette : array<string|int, mixed>
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
boolformatGeneral()
private
static formatGeneral(string $formatString) : string
Parameters
- $formatString : string
Return values
stringgetArrayItem()
Get array item.
private
static getArrayItem(mixed $array) : SimpleXMLElement|null
Parameters
- $array : mixed
-
(usually array, in theory can be false)
Return values
SimpleXMLElement|nullgetAttribute()
private
getAttribute(SimpleXMLElement $xml, string $attribute) : string
Parameters
- $xml : SimpleXMLElement
- $attribute : string
Return values
stringgetStyleAttributes()
private
getStyleAttributes(SimpleXMLElement $value) : SimpleXMLElement
Parameters
- $value : SimpleXMLElement
Return values
SimpleXMLElementreadBorder()
private
readBorder(Border $border, SimpleXMLElement $borderXml) : void
Parameters
- $border : Border
- $borderXml : SimpleXMLElement
readNumberFormat()
private
readNumberFormat(NumberFormat $numfmtStyle, SimpleXMLElement $numfmtStyleXml) : void
Parameters
- $numfmtStyle : NumberFormat
- $numfmtStyleXml : SimpleXMLElement