Documentation

DocPropsCustom extends AbstractPart
in package

Custom properties reader.

Tags
since
0.11.0

Table of Contents

Constants

READ_EQUAL  = 'attributeEquals'
READ_FALSE  = 'attributeFalse'
READ_SIZE  = 'attributeMultiplyByTwo'
READ_TRUE  = 'attributeTrue'
READ_VALUE  = '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 custom document properties.
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.
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.
findPossibleAttribute()  : null|string
Returns the first attribute found.
findPossibleElement()  : null|string
Returns the first child element found.
getHeadingDepth()  : null|number
Returns the depth of the Heading, returns 0 for a Title.
getMediaTarget()  : null|string
Returns the target of image, object, or link as stored in ::readMainRels.
getTargetMode()  : null|string
Returns the target mode.
isOn()  : bool
Parses the value of the on/off value, null is considered true as it means the w:val attribute was not present.
readCellStyle()  : null|array<string|int, mixed>
Read w:tcPr.
readFormField()  : void
readStyleDef()  : mixed
Return style definition based on conversion method.
readTableIndent()  : TblWidth
Read w:tblInd.
readTablePosition()  : array<string|int, mixed>
Read w:tblpPr.
setCommentReference()  : self
Set comment reference.

Constants

READ_SIZE

public mixed READ_SIZE = 'attributeMultiplyByTwo'

READ_VALUE

Conversion method.

public mixed READ_VALUE = 'attributeValue'
Tags
const

int

Properties

$imageLoading

Image Loading.

protected bool $imageLoading = true

$rels

Part relationships.

protected array<string|int, mixed> $rels = []

Methods

__construct()

Create new instance.

public __construct(string $docFile, string $xmlFile) : mixed
Parameters
$docFile : string
$xmlFile : string

hasImageLoading()

public hasImageLoading() : bool
Return values
bool

setCommentReferences()

Set comment references.

public setCommentReferences(array<string, array<string, null|AbstractElement>> $commentRefs) : self
Parameters
$commentRefs : array<string, array<string, null|AbstractElement>>
Return values
self

setImageLoading()

public setImageLoading(bool $value) : self
Parameters
$value : bool
Return values
self

setRels()

Set relationships.

public setRels(array<string|int, mixed> $value) : void
Parameters
$value : array<string|int, mixed>

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
todo

Get font style for preserve text

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>

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
todo

Footnote paragraph style

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
ignoreScrutinizerPatch
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
Tags
todo

Capture w:tblStylePr w:type="firstRow"

Return values
null|array<string|int, mixed>|string

findPossibleAttribute()

Returns the first attribute found.

private findPossibleAttribute(XMLReader $xmlReader, DOMElement $node, array<string|int, mixed>|string $attributes) : null|string
Parameters
$xmlReader : XMLReader
$node : DOMElement
$attributes : array<string|int, mixed>|string
Return values
null|string

findPossibleElement()

Returns the first child element found.

private findPossibleElement(XMLReader $xmlReader[, DOMElement|null $parentNode = null ][, null|array<string|int, mixed>|string $elements = null ]) : null|string
Parameters
$xmlReader : XMLReader
$parentNode : DOMElement|null = null
$elements : null|array<string|int, mixed>|string = null
Return values
null|string

getHeadingDepth()

Returns the depth of the Heading, returns 0 for a Title.

private getHeadingDepth([array<string|int, mixed>|null $paragraphStyle = null ]) : null|number
Parameters
$paragraphStyle : array<string|int, mixed>|null = null
Return values
null|number

getMediaTarget()

Returns the target of image, object, or link as stored in ::readMainRels.

private getMediaTarget(string $docPart, string $rId) : null|string
Parameters
$docPart : string
$rId : string
Return values
null|string

getTargetMode()

Returns the target mode.

private getTargetMode(string $docPart, string $rId) : null|string
Parameters
$docPart : string
$rId : string
Return values
null|string

readCellStyle()

Read w:tcPr.

private readCellStyle(XMLReader $xmlReader, DOMElement $domNode) : null|array<string|int, mixed>
Parameters
$xmlReader : XMLReader
$domNode : DOMElement
Return values
null|array<string|int, mixed>

readFormField()

private readFormField(XMLReader $xmlReader, array<string|int, DOMElement$domNodes, AbstractContainer $parent, mixed $paragraphStyle, string $formType) : void
Parameters
$xmlReader : XMLReader
$domNodes : array<string|int, DOMElement>
$parent : AbstractContainer
$paragraphStyle : mixed
$formType : string

readStyleDef()

Return style definition based on conversion method.

private readStyleDef(string $method, null|string $attributeValue, mixed $expected) : mixed
Parameters
$method : string
$attributeValue : null|string
$expected : mixed
Tags
ignoreScrutinizerPatch

readTablePosition()

Read w:tblpPr.

private readTablePosition(XMLReader $xmlReader, DOMElement $domNode) : array<string|int, mixed>
Parameters
$xmlReader : XMLReader
$domNode : DOMElement
Return values
array<string|int, mixed>

setCommentReference()

Set comment reference.

private setCommentReference(string $type, string $id, AbstractElement $element) : self
Parameters
$type : string
$id : string
$element : AbstractElement
Return values
self

        
On this page

Search results