DocxXml extends Xml
Table of Contents
Constants
- BODY_NODE_NAME = 'body'
- DOCUMENT_NODE_NAME = 'document'
- NUMBERING_TYPE_ORDERED = 'ordered'
- NUMBERING_TYPE_UNORDERED = 'unordered'
Methods
- appendXmlToNode() : mixed
- findImages() : array<string|int, mixed>
- Get all drawing nodes marked with placeholders.
- getBodyNodeName() : string
- getDocumentContentNodes() : DOMNodeList
- getDocumentNodeName() : string
- getDomDocument() : DOMDocument
- getFileExtension() : string
- getFileMimeType() : string
- getMainPrefix() : string
- getNamespaces() : array<string|int, mixed>
- getPlaceholders() : array<string|int, mixed>
- getRandomId() : string
- getValidXmlWithContent() : string
- getXPath() : DOMXPath
- insertXmlBeforeNode() : mixed
- isFileProcessable() : mixed
- normalizeContent() : void
- Normalizes content of the document, removing unnecessary tags between {}
- process() : Result
- Parse $content, process commands, fill values.
Constants
BODY_NODE_NAME
public
mixed
BODY_NODE_NAME
= 'body'
DOCUMENT_NODE_NAME
public
mixed
DOCUMENT_NODE_NAME
= 'document'
NUMBERING_TYPE_ORDERED
public
mixed
NUMBERING_TYPE_ORDERED
= 'ordered'
NUMBERING_TYPE_UNORDERED
public
mixed
NUMBERING_TYPE_UNORDERED
= 'unordered'
Methods
appendXmlToNode()
public
static appendXmlToNode(string $xml, DOMDocument $document, DOMNode $node) : mixed
Parameters
- $xml : string
- $document : DOMDocument
- $node : DOMNode
findImages()
Get all drawing nodes marked with placeholders.
public
findImages([bool $generateNewImageIds = false ][, DOMNode|null $contextNode = null ]) : array<string|int, mixed>
If $generateNewImageIds is true - will replace relation ids to new values.
Parameters
- $generateNewImageIds : bool = false
- $contextNode : DOMNode|null = null
Return values
array<string|int, mixed>getBodyNodeName()
public
static getBodyNodeName([string $mainPrefix = '' ]) : string
Parameters
- $mainPrefix : string = ''
Return values
stringgetDocumentContentNodes()
public
static getDocumentContentNodes(DOMDocument $document[, string $prefix = '' ]) : DOMNodeList
Parameters
- $document : DOMDocument
- $prefix : string = ''
Return values
DOMNodeListgetDocumentNodeName()
public
static getDocumentNodeName([string $mainPrefix = '' ]) : string
Parameters
- $mainPrefix : string = ''
Return values
stringgetDomDocument()
public
getDomDocument() : DOMDocument
Return values
DOMDocumentgetFileExtension()
public
getFileExtension() : string
Return values
stringgetFileMimeType()
public
getFileMimeType() : string
Return values
stringgetMainPrefix()
public
static getMainPrefix() : string
Return values
stringgetNamespaces()
public
static getNamespaces() : array<string|int, mixed>
Return values
array<string|int, mixed>getPlaceholders()
public
getPlaceholders() : array<string|int, mixed>
Return values
array<string|int, mixed>getRandomId()
public
static getRandomId([string $prefix = '' ][, bool $insert = false ]) : string
Parameters
- $prefix : string = ''
- $insert : bool = false
Return values
stringgetValidXmlWithContent()
public
static getValidXmlWithContent([string $content = '' ][, string $mainPrefix = '' ][, array<string|int, mixed> $namespaces = [] ]) : string
Parameters
- $content : string = ''
- $mainPrefix : string = ''
- $namespaces : array<string|int, mixed> = []
Return values
stringgetXPath()
public
getXPath() : DOMXPath
Return values
DOMXPathinsertXmlBeforeNode()
public
static insertXmlBeforeNode(string $xml, DOMDocument $document, DOMNode $node) : mixed
Parameters
- $xml : string
- $document : DOMDocument
- $node : DOMNode
isFileProcessable()
public
isFileProcessable() : mixed
normalizeContent()
Normalizes content of the document, removing unnecessary tags between {}
public
normalizeContent() : void
process()
Parse $content, process commands, fill values.
public
process() : Result
Returns true on success, false on failure.