Class Component
Class Component
- Tokamak\Dom\Node
-
Tokamak\Dom\Component
Abstract
Namespace: Tokamak\Dom
Package: Tokamak\Dom
Todo:: add selectors to make it easy to access descendant nodes within a component.
Located at Dom/Component.php
Namespace: Tokamak\Dom
Package: Tokamak\Dom
Todo:: add selectors to make it easy to access descendant nodes within a component.
Located at Dom/Component.php
public
|
#
__construct( DOMDocument $dom, array $data = null )
Accepts array of data/state and builds the component's DOM structure via the implemented render method. |
public
|
#
append(
Since a Component can have multiple top-level elements, the semantics of "appending" are ambiguous. In this implementation, calling "append" on a component instance will append a node to the parent element as a sibling after this component. |
public
|
#
setParentNode( DOMNode $parent )
Set a parent DOMNode. Once this instance has already been appended by its parent, any subsequent chained method calls to append must be appended directly to the parent's underlying DOMNode. |
addDomNode(),
appendComponent(),
appendElement(),
getDom(),
getDomNode(),
hasDomNodes(),
render(),
setDom()
|
protected
array
|
$data
the data that is passed into the component |
|
protected
DOMNode;
|
$parentNode
|
$COMPONENT_NAMESPACE,
$dom,
$domNodes
|