DOMCaster
in package
Casts DOM related classes to array representation.
Tags
Table of Contents
- ERROR_CODES = [DOM_PHP_ERR => 'DOM_PHP_ERR', DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR', DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR', DOM_HIERARCHY_REQUEST_ERR => 'DOM_HIERARCHY_REQUEST_ERR', DOM_WRONG_DOCUMENT_ERR => 'DOM_WRONG_DOCUMENT_ERR', DOM_INVALID_CHARACTER_ERR => 'DOM_INVALID_CHARACTER_ERR', DOM_NO_DATA_ALLOWED_ERR => 'DOM_NO_DATA_ALLOWED_ERR', DOM_NO_MODIFICATION_ALLOWED_ERR => 'DOM_NO_MODIFICATION_ALLOWED_ERR', DOM_NOT_FOUND_ERR => 'DOM_NOT_FOUND_ERR', DOM_NOT_SUPPORTED_ERR => 'DOM_NOT_SUPPORTED_ERR', DOM_INUSE_ATTRIBUTE_ERR => 'DOM_INUSE_ATTRIBUTE_ERR', DOM_INVALID_STATE_ERR => 'DOM_INVALID_STATE_ERR', DOM_SYNTAX_ERR => 'DOM_SYNTAX_ERR', DOM_INVALID_MODIFICATION_ERR => 'DOM_INVALID_MODIFICATION_ERR', DOM_NAMESPACE_ERR => 'DOM_NAMESPACE_ERR', DOM_INVALID_ACCESS_ERR => 'DOM_INVALID_ACCESS_ERR', DOM_VALIDATION_ERR => 'DOM_VALIDATION_ERR']
- NODE_TYPES = [XML_ELEMENT_NODE => 'XML_ELEMENT_NODE', XML_ATTRIBUTE_NODE => 'XML_ATTRIBUTE_NODE', XML_TEXT_NODE => 'XML_TEXT_NODE', XML_CDATA_SECTION_NODE => 'XML_CDATA_SECTION_NODE', XML_ENTITY_REF_NODE => 'XML_ENTITY_REF_NODE', XML_ENTITY_NODE => 'XML_ENTITY_NODE', XML_PI_NODE => 'XML_PI_NODE', XML_COMMENT_NODE => 'XML_COMMENT_NODE', XML_DOCUMENT_NODE => 'XML_DOCUMENT_NODE', XML_DOCUMENT_TYPE_NODE => 'XML_DOCUMENT_TYPE_NODE', XML_DOCUMENT_FRAG_NODE => 'XML_DOCUMENT_FRAG_NODE', XML_NOTATION_NODE => 'XML_NOTATION_NODE', XML_HTML_DOCUMENT_NODE => 'XML_HTML_DOCUMENT_NODE', XML_DTD_NODE => 'XML_DTD_NODE', XML_ELEMENT_DECL_NODE => 'XML_ELEMENT_DECL_NODE', XML_ATTRIBUTE_DECL_NODE => 'XML_ATTRIBUTE_DECL_NODE', XML_ENTITY_DECL_NODE => 'XML_ENTITY_DECL_NODE', XML_NAMESPACE_DECL_NODE => 'XML_NAMESPACE_DECL_NODE']
- castAttr() : mixed
- castCharacterData() : mixed
- castDocument() : mixed
- castDocumentType() : mixed
- castDomError() : mixed
- castElement() : mixed
- castEntity() : mixed
- castException() : mixed
- castImplementation() : mixed
- castLength() : mixed
- castLocator() : mixed
- castNameSpaceNode() : mixed
- castNode() : mixed
- castNotation() : mixed
- castProcessingInstruction() : mixed
- castText() : mixed
- castTypeinfo() : mixed
- castXPath() : mixed
Constants
ERROR_CODES
private
mixed
ERROR_CODES
= [DOM_PHP_ERR => 'DOM_PHP_ERR', DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR', DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR', DOM_HIERARCHY_REQUEST_ERR => 'DOM_HIERARCHY_REQUEST_ERR', DOM_WRONG_DOCUMENT_ERR => 'DOM_WRONG_DOCUMENT_ERR', DOM_INVALID_CHARACTER_ERR => 'DOM_INVALID_CHARACTER_ERR', DOM_NO_DATA_ALLOWED_ERR => 'DOM_NO_DATA_ALLOWED_ERR', DOM_NO_MODIFICATION_ALLOWED_ERR => 'DOM_NO_MODIFICATION_ALLOWED_ERR', DOM_NOT_FOUND_ERR => 'DOM_NOT_FOUND_ERR', DOM_NOT_SUPPORTED_ERR => 'DOM_NOT_SUPPORTED_ERR', DOM_INUSE_ATTRIBUTE_ERR => 'DOM_INUSE_ATTRIBUTE_ERR', DOM_INVALID_STATE_ERR => 'DOM_INVALID_STATE_ERR', DOM_SYNTAX_ERR => 'DOM_SYNTAX_ERR', DOM_INVALID_MODIFICATION_ERR => 'DOM_INVALID_MODIFICATION_ERR', DOM_NAMESPACE_ERR => 'DOM_NAMESPACE_ERR', DOM_INVALID_ACCESS_ERR => 'DOM_INVALID_ACCESS_ERR', DOM_VALIDATION_ERR => 'DOM_VALIDATION_ERR']
NODE_TYPES
private
mixed
NODE_TYPES
= [XML_ELEMENT_NODE => 'XML_ELEMENT_NODE', XML_ATTRIBUTE_NODE => 'XML_ATTRIBUTE_NODE', XML_TEXT_NODE => 'XML_TEXT_NODE', XML_CDATA_SECTION_NODE => 'XML_CDATA_SECTION_NODE', XML_ENTITY_REF_NODE => 'XML_ENTITY_REF_NODE', XML_ENTITY_NODE => 'XML_ENTITY_NODE', XML_PI_NODE => 'XML_PI_NODE', XML_COMMENT_NODE => 'XML_COMMENT_NODE', XML_DOCUMENT_NODE => 'XML_DOCUMENT_NODE', XML_DOCUMENT_TYPE_NODE => 'XML_DOCUMENT_TYPE_NODE', XML_DOCUMENT_FRAG_NODE => 'XML_DOCUMENT_FRAG_NODE', XML_NOTATION_NODE => 'XML_NOTATION_NODE', XML_HTML_DOCUMENT_NODE => 'XML_HTML_DOCUMENT_NODE', XML_DTD_NODE => 'XML_DTD_NODE', XML_ELEMENT_DECL_NODE => 'XML_ELEMENT_DECL_NODE', XML_ATTRIBUTE_DECL_NODE => 'XML_ATTRIBUTE_DECL_NODE', XML_ENTITY_DECL_NODE => 'XML_ENTITY_DECL_NODE', XML_NAMESPACE_DECL_NODE => 'XML_NAMESPACE_DECL_NODE']
Methods
castAttr()
public
static castAttr(DOMAttr $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMAttr
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castCharacterData()
public
static castCharacterData(DOMCharacterData $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMCharacterData
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castDocument()
public
static castDocument(DOMDocument $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested, int $filter) : mixed
Parameters
- $dom : DOMDocument
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
- $filter : int
Return values
mixed —castDocumentType()
public
static castDocumentType(DOMDocumentType $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMDocumentType
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castDomError()
public
static castDomError(DOMDomError $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMDomError
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castElement()
public
static castElement(DOMElement $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMElement
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castEntity()
public
static castEntity(DOMEntity $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMEntity
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castException()
public
static castException(DOMException $e, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $e : DOMException
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castImplementation()
public
static castImplementation(DOMImplementation $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMImplementation
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castLength()
public
static castLength(mixed $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : mixed
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castLocator()
public
static castLocator(DOMLocator $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMLocator
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castNameSpaceNode()
public
static castNameSpaceNode(DOMNameSpaceNode $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMNameSpaceNode
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castNode()
public
static castNode(DOMNode $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMNode
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castNotation()
public
static castNotation(DOMNotation $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMNotation
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castProcessingInstruction()
public
static castProcessingInstruction(DOMProcessingInstruction $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMProcessingInstruction
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castText()
public
static castText(DOMText $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMText
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castTypeinfo()
public
static castTypeinfo(DOMTypeinfo $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMTypeinfo
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castXPath()
public
static castXPath(DOMXPath $dom, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $dom : DOMXPath
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool