Styles
extends AbstractPart
in package
Styles reader.
Tags
Table of Contents
Constants
- READ_EQUAL : mixed = 'attributeEquals'
- READ_FALSE : mixed = 'attributeFalse'
- READ_SIZE : mixed = 'attributeMultiplyByTwo'
- READ_TRUE : mixed = 'attributeTrue'
- READ_VALUE : mixed = 'attributeValue'
- Conversion method.
Properties
- $commentRefs : array<string, array<string, AbstractElement>>
- Comment references.
- $docFile : string
- Document file.
- $imageLoading : bool
- Image Loading.
- $rels : array<string|int, mixed>
- Part relationships.
- $xmlFile : string
- XML file.
Methods
- __construct() : mixed
- Create new instance.
- getCommentReferences() : array<string, array<string, null|AbstractElement>>
- Get comment references.
- hasImageLoading() : bool
- read() : void
- Read styles.xml.
- setCommentReferences() : self
- Set comment references.
- setImageLoading() : self
- setRels() : void
- Set relationships.
- getCommentReference() : array<string, null|AbstractElement>
- Get comment reference.
- readFontStyle() : null|array<string|int, mixed>
- Read w:rPr.
- readParagraph() : void
- Read w:p.
- readParagraphStyle() : null|array<string|int, mixed>
- Read w:pPr.
- readRubyProperties() : RubyProperties
- Read w:rubyPr element.
- readRun() : void
- Read w:r.
- readRunChild() : void
- Parses nodes under w:r.
- readStyleDefs() : array<string|int, mixed>
- Read style definition.
- readTable() : void
- Read w:tbl.
- readTableStyle() : null|array<string|int, mixed>|string
- Read w:tblPr.
Constants
READ_EQUAL
public
mixed
READ_EQUAL
= 'attributeEquals'
READ_FALSE
public
mixed
READ_FALSE
= 'attributeFalse'
READ_SIZE
public
mixed
READ_SIZE
= 'attributeMultiplyByTwo'
READ_TRUE
public
mixed
READ_TRUE
= 'attributeTrue'
READ_VALUE
Conversion method.
public
mixed
READ_VALUE
= 'attributeValue'
Tags
Properties
$commentRefs
Comment references.
protected
array<string, array<string, AbstractElement>>
$commentRefs
= []
$docFile
Document file.
protected
string
$docFile
$imageLoading
Image Loading.
protected
bool
$imageLoading
= true
$rels
Part relationships.
protected
array<string|int, mixed>
$rels
= []
$xmlFile
XML file.
protected
string
$xmlFile
Methods
__construct()
Create new instance.
public
__construct(string $docFile, string $xmlFile) : mixed
Parameters
- $docFile : string
- $xmlFile : string
getCommentReferences()
Get comment references.
public
getCommentReferences() : array<string, array<string, null|AbstractElement>>
Return values
array<string, array<string, null|AbstractElement>>hasImageLoading()
public
hasImageLoading() : bool
Return values
boolread()
Read styles.xml.
public
read(PhpWord $phpWord) : void
Parameters
- $phpWord : PhpWord
setCommentReferences()
Set comment references.
public
setCommentReferences(array<string, array<string, null|AbstractElement>> $commentRefs) : self
Parameters
- $commentRefs : array<string, array<string, null|AbstractElement>>
Return values
selfsetImageLoading()
public
setImageLoading(bool $value) : self
Parameters
- $value : bool
Return values
selfsetRels()
Set relationships.
public
setRels(array<string|int, mixed> $value) : void
Parameters
- $value : array<string|int, mixed>
getCommentReference()
Get comment reference.
protected
getCommentReference(string $id) : array<string, null|AbstractElement>
Parameters
- $id : string
Return values
array<string, null|AbstractElement>readFontStyle()
Read w:rPr.
protected
readFontStyle(XMLReader $xmlReader, DOMElement $domNode) : null|array<string|int, mixed>
Parameters
- $xmlReader : XMLReader
- $domNode : DOMElement
Return values
null|array<string|int, mixed>readParagraph()
Read w:p.
protected
readParagraph(XMLReader $xmlReader, DOMElement $domNode, AbstractContainer $parent[, string $docPart = 'document' ]) : void
Parameters
- $xmlReader : XMLReader
- $domNode : DOMElement
- $parent : AbstractContainer
- $docPart : string = 'document'
Tags
readParagraphStyle()
Read w:pPr.
protected
readParagraphStyle(XMLReader $xmlReader, DOMElement $domNode) : null|array<string|int, mixed>
Parameters
- $xmlReader : XMLReader
- $domNode : DOMElement
Return values
null|array<string|int, mixed>readRubyProperties()
Read w:rubyPr element.
protected
readRubyProperties(XMLReader $xmlReader, DOMElement $domNode) : RubyProperties
Parameters
- $xmlReader : XMLReader
-
reader for XML
- $domNode : DOMElement
-
w:RubyPr element
Return values
RubyProperties —ruby properties from element
readRun()
Read w:r.
protected
readRun(XMLReader $xmlReader, DOMElement $domNode, AbstractContainer $parent, string $docPart[, mixed $paragraphStyle = null ]) : void
Parameters
- $xmlReader : XMLReader
- $domNode : DOMElement
- $parent : AbstractContainer
- $docPart : string
- $paragraphStyle : mixed = null
Tags
readRunChild()
Parses nodes under w:r.
protected
readRunChild(XMLReader $xmlReader, DOMElement $node, AbstractContainer $parent, string $docPart[, mixed $paragraphStyle = null ][, mixed $fontStyle = null ]) : void
Parameters
- $xmlReader : XMLReader
- $node : DOMElement
- $parent : AbstractContainer
- $docPart : string
- $paragraphStyle : mixed = null
- $fontStyle : mixed = null
readStyleDefs()
Read style definition.
protected
readStyleDefs(XMLReader $xmlReader[, DOMElement|null $parentNode = null ][, array<string|int, mixed> $styleDefs = [] ]) : array<string|int, mixed>
Parameters
- $xmlReader : XMLReader
- $parentNode : DOMElement|null = null
- $styleDefs : array<string|int, mixed> = []
Tags
Return values
array<string|int, mixed>readTable()
Read w:tbl.
protected
readTable(XMLReader $xmlReader, DOMElement $domNode, mixed $parent[, string $docPart = 'document' ]) : void
Parameters
- $xmlReader : XMLReader
- $domNode : DOMElement
- $parent : mixed
- $docPart : string = 'document'
readTableStyle()
Read w:tblPr.
protected
readTableStyle(XMLReader $xmlReader, DOMElement $domNode) : null|array<string|int, mixed>|string
Parameters
- $xmlReader : XMLReader
- $domNode : DOMElement