Document extends Node
Table of Contents
Constants
- ATTRIBUTE_NODE = 2
- CDATA_SECTION_NODE = 4
- COMMENT_NODE = 8
- DOCUMENT_FRAGMENT_NODE = 11
- DOCUMENT_NODE = 9
- DOCUMENT_TYPE_NODE = 10
- ELEMENT_NODE = 1
- ENTITY_NODE = 6
- ENTITY_REFERENCE_NODE = 5
- NOTATION_NODE = 12
- PROCESSING_INSTRUCTION_NODE = 7
- TEXT_NODE = 3
Properties
- $bxClosable : mixed
- $bxIsAlreadyClosed : mixed
- $bxNodeFoundCloseTag : mixed
- $isNodeListAsArray : mixed
Methods
- __construct() : void
- adoptNode() : mixed
- Changes the ownerDocument of a node, its children, as well as the attached attribute nodes if there are any.
- appendChild() : mixed
- Adds the node newChild to the end of the list of children of this node.
- closest() : mixed
- createAttribute() : Attr
- createComment() : Comment
- createDocumentFragment() : null
- createElement() : Element
- createTextNode() : Text
- getAttributes() : mixed
- getBody() : null|Element
- Get BODY element
- getChildNodes() : mixed
- getChildNodesArray() : mixed
- getDocumentElement() : null|Element
- getElementByClassName() : null|Node
- getElementById() : null|Node
- getElementsByAttr() : array<string|int, mixed>|NodeList
- getElementsByClassName() : array<string|int, mixed>|NodeList
- getElementsByName() : array<string|int, mixed>|NodeList
- getElementsByTagName() : array<string|int, mixed>|NodeList
- getFirstChild() : mixed
- getHead() : null|Element
- Get HEAD element
- getInnerHTML() : mixed
- getLastChild() : mixed
- getNextSibling() : mixed
- getNodeName() : mixed
- getNodeType() : mixed
- getNodeValue() : mixed
- getOuterHTML() : mixed
- getOwnerDocument() : mixed
- getParentNode() : mixed
- getParser() : Parser
- getPreviousSibling() : mixed
- getQueryEngine() : QueryEngine
- getTextContent() : mixed
- hasAttributes() : mixed
- hasChildNodes() : mixed
- insertBefore() : mixed
- isEqual() : mixed
- loadHTML() : void
- querySelector() : Node|null
- querySelectorAll() : array<string|int, Node>
- removeChild() : mixed
- replaceChild() : mixed
- saveHTML() : string
- setChildNodesArray() : mixed
- setInnerHTML() : mixed
- setNodeName() : mixed
- setOwnerDocument() : mixed
- setParentNode() : mixed
- setParser() : void
- setQueryEngine() : void
- toArray() : mixed
- toString() : mixed
Constants
ATTRIBUTE_NODE
public
mixed
ATTRIBUTE_NODE
= 2
CDATA_SECTION_NODE
public
mixed
CDATA_SECTION_NODE
= 4
COMMENT_NODE
public
mixed
COMMENT_NODE
= 8
DOCUMENT_FRAGMENT_NODE
public
mixed
DOCUMENT_FRAGMENT_NODE
= 11
DOCUMENT_NODE
public
mixed
DOCUMENT_NODE
= 9
DOCUMENT_TYPE_NODE
public
mixed
DOCUMENT_TYPE_NODE
= 10
ELEMENT_NODE
public
mixed
ELEMENT_NODE
= 1
ENTITY_NODE
public
mixed
ENTITY_NODE
= 6
ENTITY_REFERENCE_NODE
public
mixed
ENTITY_REFERENCE_NODE
= 5
NOTATION_NODE
public
mixed
NOTATION_NODE
= 12
PROCESSING_INSTRUCTION_NODE
public
mixed
PROCESSING_INSTRUCTION_NODE
= 7
TEXT_NODE
public
mixed
TEXT_NODE
= 3
Properties
$bxClosable
public
mixed
$bxClosable
= true
$bxIsAlreadyClosed
public
mixed
$bxIsAlreadyClosed
= false
$bxNodeFoundCloseTag
public
mixed
$bxNodeFoundCloseTag
= false
$isNodeListAsArray
public
static mixed
$isNodeListAsArray
= true
Methods
__construct()
public
__construct() : void
adoptNode()
Changes the ownerDocument of a node, its children, as well as the attached attribute nodes if there are any.
public
adoptNode(Node $source) : mixed
If the node has a parent it is first removed from its parent child list. This effectively allows moving a subtree from one document to another.
Parameters
- $source : Node
appendChild()
Adds the node newChild to the end of the list of children of this node.
public
appendChild(Node $newChild) : mixed
If the newChild is already in the tree, it is first removed.
Parameters
- $newChild : Node
closest()
public
closest(mixed $queryString) : mixed
Parameters
- $queryString : mixed
createAttribute()
public
createAttribute(string $name, string $value) : Attr
Parameters
- $name : string
- $value : string
Return values
AttrcreateComment()
public
createComment(string $comment) : Comment
Parameters
- $comment : string
Return values
CommentcreateDocumentFragment()
public
createDocumentFragment() : null
Return values
nullcreateElement()
public
createElement(string $tagName) : Element
Parameters
- $tagName : string
Return values
ElementcreateTextNode()
public
createTextNode(string $text) : Text
Parameters
- $text : string
Return values
TextgetAttributes()
public
getAttributes() : mixed
getBody()
Get BODY element
public
getBody() : null|Element
Return values
null|ElementgetChildNodes()
public
getChildNodes() : mixed
getChildNodesArray()
public
getChildNodesArray() : mixed
getDocumentElement()
public
getDocumentElement() : null|Element
Return values
null|ElementgetElementByClassName()
public
getElementByClassName(mixed $className) : null|Node
Parameters
- $className : mixed
Return values
null|NodegetElementById()
public
getElementById(mixed $id) : null|Node
Parameters
- $id : mixed
Return values
null|NodegetElementsByAttr()
public
getElementsByAttr(mixed $attrName[, mixed $attrValue = null ][, mixed $limit = 0 ]) : array<string|int, mixed>|NodeList
Parameters
- $attrName : mixed
- $attrValue : mixed = null
- $limit : mixed = 0
Return values
array<string|int, mixed>|NodeListgetElementsByClassName()
public
getElementsByClassName(mixed $className[, mixed $limit = 0 ]) : array<string|int, mixed>|NodeList
Parameters
- $className : mixed
- $limit : mixed = 0
Return values
array<string|int, mixed>|NodeListgetElementsByName()
public
getElementsByName(mixed $name) : array<string|int, mixed>|NodeList
Parameters
- $name : mixed
Return values
array<string|int, mixed>|NodeListgetElementsByTagName()
public
getElementsByTagName(mixed $tagName) : array<string|int, mixed>|NodeList
Parameters
- $tagName : mixed
Return values
array<string|int, mixed>|NodeListgetFirstChild()
public
getFirstChild() : mixed
getHead()
Get HEAD element
public
getHead() : null|Element
Return values
null|ElementgetInnerHTML()
public
getInnerHTML() : mixed
getLastChild()
public
getLastChild() : mixed
getNextSibling()
public
getNextSibling() : mixed
getNodeName()
public
getNodeName() : mixed
getNodeType()
public
getNodeType() : mixed
getNodeValue()
public
getNodeValue() : mixed
getOuterHTML()
public
getOuterHTML() : mixed
getOwnerDocument()
public
getOwnerDocument() : mixed
getParentNode()
public
getParentNode() : mixed
getParser()
public
getParser() : Parser
Return values
ParsergetPreviousSibling()
public
getPreviousSibling() : mixed
getQueryEngine()
public
getQueryEngine() : QueryEngine
Return values
QueryEnginegetTextContent()
public
getTextContent() : mixed
hasAttributes()
public
hasAttributes() : mixed
hasChildNodes()
public
hasChildNodes() : mixed
insertBefore()
public
insertBefore(Node $newChild[, Node $refChild = null ][, mixed $removeExist = true ]) : mixed
Parameters
isEqual()
public
isEqual([Node $node = null ]) : mixed
Parameters
- $node : Node = null
loadHTML()
public
loadHTML(string $source) : void
Parameters
- $source : string
querySelector()
public
querySelector(string $queryString) : Node|null
Parameters
- $queryString : string
Return values
Node|nullquerySelectorAll()
public
querySelectorAll(string $queryString) : array<string|int, Node>
Parameters
- $queryString : string
Return values
array<string|int, Node>removeChild()
public
removeChild(Node $oldChild) : mixed
Parameters
- $oldChild : Node
replaceChild()
public
replaceChild(Node $newChild, Node $oldChild) : mixed
Parameters
saveHTML()
public
saveHTML([null|Node $node = null ]) : string
Parameters
- $node : null|Node = null
Return values
stringsetChildNodesArray()
public
setChildNodesArray(mixed $childList) : mixed
Parameters
- $childList : mixed
setInnerHTML()
public
setInnerHTML(mixed $html) : mixed
Parameters
- $html : mixed
setNodeName()
public
setNodeName(mixed $a) : mixed
Parameters
- $a : mixed
setOwnerDocument()
public
setOwnerDocument(Document $owner) : mixed
Parameters
- $owner : Document
setParentNode()
public
setParentNode([Node $node = null ]) : mixed
Parameters
- $node : Node = null
setParser()
public
setParser(Parser $parser) : void
Parameters
- $parser : Parser
setQueryEngine()
public
setQueryEngine(QueryEngine $engine) : void
Parameters
- $engine : QueryEngine
toArray()
public
toArray() : mixed
toString()
public
toString() : mixed