Class Node
Class Node
Indirect known subclasses
Tokamak\Dom\HTMLDocumentNamespace: Tokamak\Dom
Package: Tokamak\Dom
Throws: RuntimeException
Located at Dom/Node.php
abstract public
|
#
append(
Append one Node instance as a child of another. Must be implemented differently for Element and Component, because the former is a single element that can have children, whereas the latter can represent a list of multiple top-level elements and components. Meanwhile, Document appends children to the top-level DOMDocument instance. |
public
|
#
appendElement( string $name, array $attributes = null, string $content = '', Closure $callback = null )
Syntactic sugar for constructing and then appending a new Element. Abstracts away the need to pass the ancestor DOMDocument to the child. |
public
|
#
appendComponent( string $name, array $data = null, Closure $callback = null )
Syntactic sugar for constructing and then appending a new Component. Abstracts away the need to pass the ancestor DOMDocument to the child. If a user-defined Component class of the requested name is not found, will look in the Tokamak\Dom\Components namespace for a built-in component class. |
public
|
|
public
DOMDocument
|
|
protected
|
#
addDomNode( DOMNode $node )
Add a DOMNode to the queue of nodes that will be appended to this node's parent. |
public
DOMNode
|
#
getDomNode( )
Remove a DOMNode from the queue of nodes to be appended to the parent and return it. |
public
boolean
|
|
abstract protected
|
protected static
string
|
$COMPONENT_NAMESPACE
Tokamak will look for components in this namespace if they are not defined elsewhere. |
#
'\Tokamak\Dom\Components\\'
|
protected
DOMDocument
|
$dom
The underlying DOMDocument instance. Normally created by Tokamak\Dom\Document instance. |
|
protected
SplQueue<DOMNode>
|
$domNodes
Queue of dom nodes to be appended to the parent node. |