Properties

$childNodes

$childNodes : array

Object child nodes

Type

array

$indent

$indent : string

Indentation for formatting purposes.

Type

string

$output

$output : string

Child output

Type

string

$nodeName

$nodeName : string

Child element node name

Type

string

$nodeValue

$nodeValue : string

Child element node value

Type

string

$childrenFirst

$childrenFirst : boolean

Flag to render children before node value or not.

Type

boolean

$attributes

$attributes : array

Child element attributes

Type

array

Methods

getIndent()

getIndent() : string

Return the indent.

Returns

string

setIndent()

setIndent(string  $indent) : mixed

Set the indent.

Parameters

string $indent

Returns

mixed

addChild()

addChild(mixed  $c) : mixed

Add a child to the object.

Parameters

mixed $c

Throws

\InvalidArgumentException

Returns

mixed

addChildren()

addChildren(array  $c) : mixed

Add children to the object.

Parameters

array $c

Throws

\Pop\Dom\Exception

Returns

mixed

hasChildren()

hasChildren() : boolean

Get whether or not the child object has children

Returns

boolean

getChild()

getChild(integer  $i) : \Pop\Dom\Child

Get the child nodes of the object.

Parameters

integer $i

Returns

\Pop\Dom\Child

getChildren()

getChildren() : array

Get the child nodes of the object.

Returns

array

removeChild()

removeChild(integer  $i) : void

Remove all child nodes from the object.

Parameters

integer $i

removeChildren()

removeChildren() : void

Remove all child nodes from the object.

__construct()

__construct(string  $name, string  $value = null, mixed  $childNode = null, boolean  $first = false, string  $indent = null) : \Pop\Dom\Child

Constructor

Instantiate the form element object

Parameters

string $name
string $value
mixed $childNode
boolean $first
string $indent

Returns

\Pop\Dom\Child

factory()

factory(array  $c) : \Pop\Dom\Child

Static factory method to create a child object

Parameters

array $c

Throws

\Pop\Dom\Exception

Returns

\Pop\Dom\Child

getNodeName()

getNodeName() : string

Return the child node name.

Returns

string

getNodeValue()

getNodeValue() : string

Return the child node value.

Returns

string

setNodeName()

setNodeName(string  $name) : \Pop\Dom\Child

Set the child node name.

Parameters

string $name

Returns

\Pop\Dom\Child

setNodeValue()

setNodeValue(string  $value) : \Pop\Dom\Child

Set the child node value.

Parameters

string $value

Returns

\Pop\Dom\Child

setAttribute()

setAttribute(string  $a, string  $v) : \Pop\Dom\Child

Set an attribute for the child element object.

Parameters

string $a
string $v

Returns

\Pop\Dom\Child

setAttributes()

setAttributes(array  $a) : \Pop\Dom\Child

Set an attribute or attributes for the child element object.

Parameters

array $a

Returns

\Pop\Dom\Child

getAttribute()

getAttribute(string  $name) : string

Get the attribute of the child object.

Parameters

string $name

Returns

string

getAttributes()

getAttributes() : array

Get the attributes of the child object.

Returns

array

removeAttribute()

removeAttribute(string  $a) : \Pop\Dom\Child

Remove an attribute from the child element object

Parameters

string $a

Returns

\Pop\Dom\Child

render()

render(boolean  $ret = false, integer  $depth, string  $indent = null) : mixed

Render the child and its child nodes.

Parameters

boolean $ret
integer $depth
string $indent

Returns

mixed

__toString()

__toString() : string

Render Dom child object to string

Returns

string