Properties

$type

$type : string

Element type

Type

string

$name

$name : string

Element name

Type

string

$value

$value : string|array

Form element value(s)

Type

string|array

$marked

$marked : string|array

Form element marked value(s)

Type

string|array

$label

$label : string

Form element label

Type

string

$hint

$hint : string

Form element hint

Type

string

$labelAttributes

$labelAttributes : array

Form element label attributes

Type

array

$hintAttributes

$hintAttributes : array

Form element hint attributes

Type

array

$required

$required : boolean

Form element required property

Type

boolean

$validators

$validators : array

Form element validators

Type

array

$errorDisplay

$errorDisplay : array

Form element error display format

Type

array

$errors

$errors : array

Form element errors

Type

array

$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

Methods

__construct()

__construct(string  $name, string  $value = null, string  $indent = null) : \Pop\Form\Element\Input\Month

Constructor

Instantiate the email input form element

Parameters

string $name
string $value
string $indent

Returns

\Pop\Form\Element\Input\Month

setRequired()

setRequired(boolean  $required) : \Pop\Form\Element\AbstractElement

Set whether the form element is required

Parameters

boolean $required

Returns

\Pop\Form\Element\AbstractElement

setValue()

setValue(mixed  $value) : \Pop\Form\Element\AbstractElement

Set the value of the form element object

Parameters

mixed $value

Returns

\Pop\Form\Element\AbstractElement

setName()

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

Set the name of the form element object

Parameters

string $name

Returns

\Pop\Form\Element\AbstractElement

setMarked()

setMarked(mixed  $marked) : \Pop\Form\Element\AbstractElement

Set the marked value of the form element object

Parameters

mixed $marked

Returns

\Pop\Form\Element\AbstractElement

setLabel()

setLabel(string  $label) : \Pop\Form\Element\AbstractElement

Set the label of the form element object

Parameters

string $label

Returns

\Pop\Form\Element\AbstractElement

setHint()

setHint(string  $hint) : \Pop\Form\Element\AbstractElement

Set the hint of the form element object

Parameters

string $hint

Returns

\Pop\Form\Element\AbstractElement

setLabelAttribute()

setLabelAttribute(string  $a, string  $v) : \Pop\Form\Element\AbstractElement

Set an attribute of the label of the form element object

Parameters

string $a
string $v

Returns

\Pop\Form\Element\AbstractElement

setLabelAttributes()

setLabelAttributes(array  $attribs) : \Pop\Form\Element\AbstractElement

Set the attributes of the label of the form element object

Parameters

array $attribs

Returns

\Pop\Form\Element\AbstractElement

setHintAttribute()

setHintAttribute(string  $a, string  $v) : \Pop\Form\Element\AbstractElement

Set an attribute of the hint of the form element object

Parameters

string $a
string $v

Returns

\Pop\Form\Element\AbstractElement

setHintAttributes()

setHintAttributes(array  $attribs) : \Pop\Form\Element\AbstractElement

Set the attributes of the hint of the form element object

Parameters

array $attribs

Returns

\Pop\Form\Element\AbstractElement

setErrorPre()

setErrorPre(boolean  $pre = true) : \Pop\Form\Element\AbstractElement

Set error pre-display

Parameters

boolean $pre

Returns

\Pop\Form\Element\AbstractElement

setErrorPost()

setErrorPost(boolean  $post = true) : \Pop\Form\Element\AbstractElement

Set error post-display

Parameters

boolean $post

Returns

\Pop\Form\Element\AbstractElement

setErrorDisplay()

setErrorDisplay(string  $container, array  $attribs = null, boolean  $pre = false) : \Pop\Form\Element\AbstractElement

Set error display values

Parameters

string $container
array $attribs
boolean $pre

Returns

\Pop\Form\Element\AbstractElement

setValidators()

setValidators(array  $validators = array()) : \Pop\Form\Element\AbstractElement

Set validators

Parameters

array $validators

Returns

\Pop\Form\Element\AbstractElement

getName()

getName() : string

Get form element object name

Returns

string

getType()

getType() : string

Get form element object type

Returns

string

getValue()

getValue() : mixed

Get form element object value

Returns

mixed

getMarked()

getMarked() : mixed

Get form element object marked values

Returns

mixed

getLabel()

getLabel() : string

Get form element object label

Returns

string

getHint()

getHint() : string

Get form element object hint

Returns

string

getLabelAttributes()

getLabelAttributes() : array

Get the attributes of the form element object label

Returns

array

getHintAttributes()

getHintAttributes() : array

Get the attributes of the form element object hint

Returns

array

getValidators()

getValidators() : array

Get validators

Returns

array

getErrorDisplay()

getErrorDisplay() : array

Get error display values

Returns

array

isRequired()

isRequired() : boolean

Get whether the form element object is required

Returns

boolean

getErrors()

getErrors() : array

Get form element object errors

Returns

array

hasErrors()

hasErrors() : boolean

Get if form element object has errors

Returns

boolean

addValidator()

addValidator(mixed  $validator) : \Pop\Form\Element\AbstractElement

Add a validator the form element

Parameters

mixed $validator

Throws

\Pop\Form\Element\Exception

Returns

\Pop\Form\Element\AbstractElement

addValidators()

addValidators(array  $validators) : \Pop\Form\Element\AbstractElement

Add multiple validators the form element

Parameters

array $validators

Returns

\Pop\Form\Element\AbstractElement

validate()

validate(array  $fields = array()) : boolean

Validate the form element object

Parameters

array $fields

Throws

\Pop\Form\Element\Exception

Returns

boolean

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

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

__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.