category Zend
package Zend_Form
subpackage Element

 Methods

__construct()

__construct(null | int | string $name, array $options) 
Inherited

inherited_from \Zend\Form\Element::__construct()
inherited_from \Zend\Form\Element\Number::__construct()

Parameters

$name

nullintstring

Optional name for the element

$options

array

Optional options for the element

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Clear all attributes

clearAttributes() : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::clearAttributes()
inherited_from \Zend\Form\Element\Number::clearAttributes()

Returns

Retrieve a single element attribute

getAttribute($key) : mixed | null
Inherited

inherited_from \Zend\Form\Element::getAttribute()
inherited_from \Zend\Form\Element\Number::getAttribute()

Parameters

$key

Returns

mixednull

Retrieve all attributes at once

getAttributes() : array | \Traversable
Inherited

inherited_from \Zend\Form\Element::getAttributes()
inherited_from \Zend\Form\Element\Number::getAttributes()

Returns

array\Traversable

Provide default input rules for this element

getInputSpecification() : array
Inherited

Attaches a number validator, as well as a greater than and less than validators

inherited_from \Zend\Form\Element\Number::getInputSpecification()

Returns

array

Retrieve the label used for this element

getLabel() : string
Inherited

inherited_from \Zend\Form\Element::getLabel()
inherited_from \Zend\Form\Element\Number::getLabel()

Returns

string

Get the attributes to use with the label

getLabelAttributes() : array
Inherited

inherited_from \Zend\Form\Element::getLabelAttributes()
inherited_from \Zend\Form\Element\Number::getLabelAttributes()

Returns

array

Get validation error messages, if any.

getMessages() : array | \Traversable
Inherited

Returns a list of validation failure messages, if any.

inherited_from \Zend\Form\Element::getMessages()
inherited_from \Zend\Form\Element\Number::getMessages()

Returns

array\Traversable

Get value for name

getName() : string | int
Inherited

inherited_from \Zend\Form\Element::getName()
inherited_from \Zend\Form\Element\Number::getName()

Returns

stringint

Return the specified option

getOption(string $option) : NULL | mixed
Inherited

inherited_from \Zend\Form\Element::getOption()
inherited_from \Zend\Form\Element\Number::getOption()

Parameters

$option

string

Returns

NULLmixed

Get defined options

getOptions() : array
Inherited

inherited_from \Zend\Form\Element::getOptions()
inherited_from \Zend\Form\Element\Number::getOptions()

Returns

array

Retrieve the element value

getValue() : mixed
Inherited

inherited_from \Zend\Form\Element::getValue()
inherited_from \Zend\Form\Element\Number::getValue()

Returns

mixed

Does the element has a specific attribute ?

hasAttribute(string $key) : bool
Inherited

inherited_from \Zend\Form\Element::hasAttribute()
inherited_from \Zend\Form\Element\Number::hasAttribute()

Parameters

$key

string

Returns

bool

Set a single element attribute

setAttribute(string $key, mixed $value) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::setAttribute()
inherited_from \Zend\Form\Element\Number::setAttribute()

Parameters

$key

string

$value

mixed

Returns

Set many attributes at once

setAttributes(array | \Traversable $arrayOrTraversable) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

Implementation will decide if this will overwrite or merge.

inherited_from \Zend\Form\Element::setAttributes()
inherited_from \Zend\Form\Element\Number::setAttributes()

Parameters

$arrayOrTraversable

array\Traversable

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

Set the label used for this element

setLabel($label) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::setLabel()
inherited_from \Zend\Form\Element\Number::setLabel()

Parameters

$label

Returns

Set the attributes to use with the label

setLabelAttributes(array $labelAttributes) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::setLabelAttributes()
inherited_from \Zend\Form\Element\Number::setLabelAttributes()

Parameters

$labelAttributes

array

Returns

Set a list of messages to report when validation fails

setMessages(array | \Traversable $messages) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::setMessages()
inherited_from \Zend\Form\Element\Number::setMessages()

Parameters

$messages

array\Traversable

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

Set value for name

setName(string $name) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

In most cases, this will proxy to the attributes for storage, but is present to indicate that elements are generally named.

inherited_from \Zend\Form\Element::setName()
inherited_from \Zend\Form\Element\Number::setName()

Parameters

$name

string

Returns

Set options for an element.

setOptions(array | \Traversable $options) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

Accepted options are: - label: label to associate with the element - label_attributes: attributes to use when the label is rendered

inherited_from \Zend\Form\Element::setOptions()
inherited_from \Zend\Form\Element\Number::setOptions()

Parameters

$options

array\Traversable

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

Set the element value

setValue(mixed $value) : \Zend\Form\Element
Inherited

inherited_from \Zend\Form\Element::setValue()
inherited_from \Zend\Form\Element\Number::setValue()

Parameters

$value

mixed

Returns

 Properties

 

Seed attributes

$attributes : array

 

$label

$label : string
Inherited

inherited_from \Zend\Form\Element::$$label
inherited_from \Zend\Form\Element\Number::$$label
 

$labelAttributes

$labelAttributes : array
Inherited

inherited_from \Zend\Form\Element::$$labelAttributes
inherited_from \Zend\Form\Element\Number::$$labelAttributes
 

<p>Validation error messages</p>

$messages : array
Inherited

inherited_from \Zend\Form\Element::$$messages
inherited_from \Zend\Form\Element\Number::$$messages
 

<p>custom options</p>

$options : array
Inherited

inherited_from \Zend\Form\Element::$$options
inherited_from \Zend\Form\Element\Number::$$options
 

$validators

$validators : array
Inherited

inherited_from \Zend\Form\Element\Number::$$validators
 

$value

$value : mixed
Inherited

inherited_from \Zend\Form\Element::$$value
inherited_from \Zend\Form\Element\Number::$$value