Xml extends Body
AbstractYes
Table of Contents
Constants
- ARRAY_INDEX_MODIFIER = 'index'
- BLOCK_END_PLACEHOLDER = 'BLOCK_END'
- BLOCK_START_PLACEHOLDER = 'BLOCK_START'
- BODY_NODE_NAME = 'body'
- DOCUMENT_NODE_NAME = 'document'
Methods
- __construct() : mixed
- Body constructor.
- appendXmlToNode() : mixed
- detectHtml() : bool
- getBodyNodeName() : string
- getCodeFromPlaceholder() : string
- getContent() : string
- getDocumentContentNodes() : DOMNodeList
- getDocumentNodeName() : string
- getDomDocument() : DOMDocument
- getFieldNames() : array<string|int, mixed>
- getFields() : array<string|int, mixed>
- getFileExtension() : string
- getFileMimeType() : string
- getMainPrefix() : string
- getNamespaces() : array<string|int, mixed>
- getPlaceholders() : array<string|int, mixed>
- getRandomId() : string
- getStorage() : Storage
- getValidXmlWithContent() : string
- getXPath() : DOMXPath
- insertXmlBeforeNode() : mixed
- isFileProcessable() : bool
- normalizeContent() : mixed
- Normalizes content of the body.
- process() : Result
- Parse $content, process commands, fill values.
- readFromStorage() : static|false
- save() : AddResult
- setExcludedPlaceholders() : mixed
- Set placeholders list that will not be filled with values.
- setFields() : $this
- setStorage() : $this
- setValues() : $this
Constants
ARRAY_INDEX_MODIFIER
public
mixed
ARRAY_INDEX_MODIFIER
= 'index'
BLOCK_END_PLACEHOLDER
public
mixed
BLOCK_END_PLACEHOLDER
= 'BLOCK_END'
BLOCK_START_PLACEHOLDER
public
mixed
BLOCK_START_PLACEHOLDER
= 'BLOCK_START'
BODY_NODE_NAME
public
mixed
BODY_NODE_NAME
= 'body'
DOCUMENT_NODE_NAME
public
mixed
DOCUMENT_NODE_NAME
= 'document'
Methods
__construct()
Body constructor.
public
__construct(string $content) : mixed
Parameters
- $content : string
appendXmlToNode()
public
static appendXmlToNode(string $xml, DOMDocument $document, DOMNode $node) : mixed
Parameters
- $xml : string
- $document : DOMDocument
- $node : DOMNode
detectHtml()
public
static detectHtml(string $string) : bool
Parameters
- $string : string
Return values
boolgetBodyNodeName()
public
static getBodyNodeName([string $mainPrefix = '' ]) : string
Parameters
- $mainPrefix : string = ''
Return values
stringgetCodeFromPlaceholder()
public
static getCodeFromPlaceholder(string $code) : string
Parameters
- $code : string
Return values
stringgetContent()
public
getContent() : 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
DOMDocumentgetFieldNames()
public
getFieldNames() : array<string|int, mixed>
Return values
array<string|int, mixed>getFields()
public
getFields() : array<string|int, mixed>
Return values
array<string|int, mixed>getFileExtension()
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
stringgetStorage()
public
getStorage() : Storage
Return values
StoragegetValidXmlWithContent()
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() : bool
Return values
boolnormalizeContent()
Normalizes content of the body.
public
normalizeContent() : mixed
process()
Parse $content, process commands, fill values.
public
abstract process() : Result
Returns true on success, false on failure.
Return values
ResultreadFromStorage()
public
static readFromStorage(Storage $storage, mixed $from) : static|false
Parameters
- $storage : Storage
- $from : mixed
Return values
static|falsesave()
public
save(array<string|int, mixed> $options[, Storage|null $storage = null ]) : AddResult
Parameters
- $options : array<string|int, mixed>
- $storage : Storage|null = null
Return values
AddResultsetExcludedPlaceholders()
Set placeholders list that will not be filled with values.
public
setExcludedPlaceholders(array<string|int, mixed> $placeholders) : mixed
Parameters
- $placeholders : array<string|int, mixed>
setFields()
public
setFields(array<string|int, mixed> $fields) : $this
Parameters
- $fields : array<string|int, mixed>
Return values
$thissetStorage()
public
setStorage(Storage $storage) : $this
Parameters
- $storage : Storage
Return values
$thissetValues()
public
setValues(array<string|int, mixed> $values) : $this
Parameters
- $values : array<string|int, mixed>