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

$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 values

Type

array

$filters

$filters : array

Filters

Type

array

$filterExcludeByType

$filterExcludeByType : array

Fields to exclude filtering by type

Type

array

$filterExcludeByName

$filterExcludeByName : array

Fields to exclude filtering by name

Type

array

$groups

$groups : array

Form field groups

Type

array

$fieldConfig

$fieldConfig : array

Form field configuration values

Type

array

$fieldGroupConfig

$fieldGroupConfig : array

Form field group configuration values

Type

array

$errorDisplay

$errorDisplay : array

Global Form error display format

Type

array

$hasFile

$hasFile : boolean

Has file flag

Type

boolean

Methods

__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

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.

setTemplate()

setTemplate(string  $template) : \Pop\Form\Form

Set a form template

Parameters

string $template

Returns

\Pop\Form\Form

setAction()

setAction(string  $action) : \Pop\Form\Form

Set the form action

Parameters

string $action

Returns

\Pop\Form\Form

setMethod()

setMethod(string  $method) : \Pop\Form\Form

Set the form method

Parameters

string $method

Returns

\Pop\Form\Form

addFilter()

addFilter(mixed  $call, mixed  $params = null, mixed  $excludeByType = null, mixed  $excludeByName = null) : \Pop\Form\AbstractForm

Add filter

Parameters

mixed $call
mixed $params
mixed $excludeByType
mixed $excludeByName

Returns

\Pop\Form\AbstractForm

addFilters()

addFilters(array  $filters, mixed  $excludeByType = null, mixed  $excludeByName = null) : \Pop\Form\AbstractForm

Add filters

Parameters

array $filters
mixed $excludeByType
mixed $excludeByName

Throws

\Pop\Form\Exception

Returns

\Pop\Form\AbstractForm

hasFile()

hasFile() : boolean

Get the $hasFile property

Returns

boolean

getAction()

getAction() : array

Get the form action

Returns

array

getMethod()

getMethod() : array

Get the form method

Returns

array

getFields()

getFields() : array

Get the form fields

Returns

array

elements()

elements() : array

Alias method to getElements())

Returns

array

getElements()

getElements() : array

Get the elements of the form object.

Returns

array

element()

element(string  $elementName) : \Pop\Form\Element\AbstractElement

Alias method to getElement()

Parameters

string $elementName

Returns

\Pop\Form\Element\AbstractElement

getElement()

getElement(string  $elementName) : \Pop\Form\Element\AbstractElement

Get an element object of the form by name.

Parameters

string $elementName

Returns

\Pop\Form\Element\AbstractElement

getElementIndex()

getElementIndex(string  $elementName) : integer

Get the index of an element object of the form by name.

Parameters

string $elementName

Returns

integer

getFieldConfig()

getFieldConfig(  $name = null) : array

Get fieldConfig

Parameters

$name

Returns

array

getFieldGroupConfig()

getFieldGroupConfig() : array

Get fieldGroupConfig

Returns

array

hasFieldGroupConfig()

hasFieldGroupConfig() : boolean

Determine if the for has group field configs

Returns

boolean

clear()

clear() : \Pop\Form\Form

Method to clear any session data used with the form for security tokens, captchas, etc.

Returns

\Pop\Form\Form

__set()

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

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

Parameters

string $name
mixed $value

Throws

\Pop\Form\Exception

__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

setFieldValues()

setFieldValues(array  $values = null) : \Pop\Form\AbstractForm

Set the field values. Optionally, you can apply filters to the passed values via callbacks and their parameters

Parameters

array $values

Returns

\Pop\Form\AbstractForm

filter()

filter() : \Pop\Form\AbstractForm

Filter of field values with the filters that have been set

Returns

\Pop\Form\AbstractForm

filterValues()

filterValues(array  $values = null) : mixed

Method to filter the values with the applied callbacks and their parameters

Parameters

array $values

Returns

mixed

applyFilter()

applyFilter(array  $array, string  $call, array  $params = array()) : void

Execute filter

Parameters

array $array
string $call
array $params