Properties

$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

$preserveWhiteSpace

$preserveWhiteSpace : boolean

Flag to preserve whitespace

Type

boolean

$childNodes

$childNodes : array

Object child nodes

Type

array

$indent

$indent : string

Indentation for formatting purposes

Type

string

$output

$output : string

Child output

Type

string

$fields

$fields : array

Form field elements

Type

array

$current

$current : integer

Current field group

Type

integer

$legend

$legend : string

Fieldset legend

Type

string

$container

$container : string

Fieldset container (dl, table, div or p)

Type

string

Methods

__construct()

__construct(array  $fields = null, string  $container = 'dl') 

Constructor

Instantiate the form fieldset object

Parameters

array $fields
string $container

create()

create(string  $name, string  $value = null, array  $options = array()) : \Pop\Dom\Child

Static factory method to create a child object

Parameters

string $name
string $value
array $options

Returns

\Pop\Dom\Child

parseString()

parseString(string  $string) : \Pop\Dom\Child|array

Static method to parse an XML/HTML string

Parameters

string $string

Returns

\Pop\Dom\Child|array

parseFile()

parseFile(string  $file) : \Pop\Dom\Child

Static method to parse an XML/HTML string from a file

Parameters

string $file

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

getNodeContent()

getNodeContent() : string

Return the child node content, including tags, etc

Returns

string

getTextContent()

getTextContent() : string

Return the child node content, including tags, etc

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

hasAttribute()

hasAttribute(string  $name) : boolean

Determine if the child object has an attribute

Parameters

string $name

Returns

boolean

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

isChildrenFirst()

isChildrenFirst() : boolean

Determine if child nodes render first, before the node value

Returns

boolean

setChildrenFirst()

setChildrenFirst(boolean  $first = true) : \Pop\Dom\Child

Set whether child nodes render first, before the node value

Parameters

boolean $first

Returns

\Pop\Dom\Child

preserveWhiteSpace()

preserveWhiteSpace(boolean  $preserve = true) : \Pop\Dom\Child

Set whether to preserve whitespace

Parameters

boolean $preserve

Returns

\Pop\Dom\Child

render()

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

Render the child and its child nodes.

Parameters

integer $depth
string $indent
boolean $inner

Returns

mixed

__toString()

__toString() : string

Render Dom child object to string

Returns

string

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(  $children) : mixed

Add children to the object

Parameters

$children

Throws

\Pop\Dom\Exception

Returns

mixed

hasChildren()

hasChildren() : boolean

Get whether or not the child object has children

Returns

boolean

hasChildNodes()

hasChildNodes() : boolean

Get whether or not the child object has children (alias)

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

getChildNodes()

getChildNodes() : array

Get the child nodes of the object (alias)

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

createFromConfig()

createFromConfig(array  $config) : \Pop\Form\Fieldset

Method to create form fieldset object and fields from config

Parameters

array $config

Returns

\Pop\Form\Fieldset

setContainer()

setContainer(string  $container) : \Pop\Form\Fieldset

Method to set container

Parameters

string $container

Returns

\Pop\Form\Fieldset

setCurrent()

setCurrent(integer  $i) : \Pop\Form\Fieldset

Method to get current group index

Parameters

integer $i

Returns

\Pop\Form\Fieldset

createGroup()

createGroup() : \Pop\Form\Fieldset

Method to create new group

Returns

\Pop\Form\Fieldset

addFields()

addFields(array  $fields) : \Pop\Form\Fieldset

Method to add form fields

Parameters

array $fields

Returns

\Pop\Form\Fieldset

count()

count() : integer

Method to get the count of elements in the form fieldset

Returns

integer

toArray()

toArray() : array

Method to get the field values as an array

Returns

array

getLegend()

getLegend() : string

Method to get fieldset legend

Returns

string

getContainer()

getContainer() : string

Method to get container

Returns

string

getCurrent()

getCurrent() : integer

Method to get current group index

Returns

integer

hasField()

hasField(string  $name) : boolean

Method to determine if the fieldset has a field

Parameters

string $name

Returns

boolean

getField()

getField(string  $name) : \Pop\Form\Element\AbstractElement

Method to get a field element object

Parameters

string $name

Returns

\Pop\Form\Element\AbstractElement

getFields()

getFields(integer  $i) : array

Method to get field element objects in a group

Parameters

integer $i

Returns

array

getFieldGroups()

getFieldGroups() : array

Method to get all field element groups

Returns

array

getAllFields()

getAllFields() : array

Method to get all field elements

Returns

array

getFieldValue()

getFieldValue(string  $name) : mixed

Method to get a field element value

Parameters

string $name

Returns

mixed

setLegend()

setLegend(string  $legend) : \Pop\Form\Fieldset

Method to set fieldset legend

Parameters

string $legend

Returns

\Pop\Form\Fieldset

setFieldValue()

setFieldValue(string  $name, mixed  $value) : \Pop\Form\Fieldset

Method to set a field element value

Parameters

string $name
mixed $value

Returns

\Pop\Form\Fieldset

setFieldValues()

setFieldValues(array  $values) : \Pop\Form\Fieldset

Method to set field element values

Parameters

array $values

Returns

\Pop\Form\Fieldset

getIterator()

getIterator() : \ArrayIterator

Method to iterate over the form elements

Returns

\ArrayIterator

prepare()

prepare() : \Pop\Form\Fieldset

Prepare fieldset object for rendering

Returns

\Pop\Form\Fieldset

prepareForView()

prepareForView() : array

Prepare fieldset elements for rendering with a view

Returns

array

__set()

__set(string  $name, mixed  $value) : void

Set method to set the property to the value of fields[$name]

Parameters

string $name
mixed $value

__get()

__get(string  $name) : mixed

Get method to return the value of fields[$name]

Parameters

string $name

Throws

\Pop\Form\Exception

Returns

mixed

__isset()

__isset(string  $name) : boolean

Return the isset value of fields[$name]

Parameters

string $name

Returns

boolean

__unset()

__unset(string  $name) : void

Unset fields[$name]

Parameters

string $name

offsetExists()

offsetExists(mixed  $offset) : boolean

ArrayAccess offsetExists

Parameters

mixed $offset

Returns

boolean

offsetGet()

offsetGet(mixed  $offset) : mixed

ArrayAccess offsetGet

Parameters

mixed $offset

Returns

mixed

offsetSet()

offsetSet(mixed  $offset, mixed  $value) : void

ArrayAccess offsetSet

Parameters

mixed $offset
mixed $value

offsetUnset()

offsetUnset(mixed  $offset) : void

ArrayAccess offsetUnset

Parameters

mixed $offset