Zend Framework  3.0
Public Member Functions | List of all members
ElementInterface Interface Reference

Public Member Functions

 setName ($name)
 Set the name of this element.
 
 getName ()
 Retrieve the element name.
 
 setOptions ($options)
 Set options for an element.
 
 setOption ($key, $value)
 Set a single option for an element.
 
 getOptions ()
 get the defined options
 
 getOption ($option)
 return the specified option
 
 setAttribute ($key, $value)
 Set a single element attribute.
 
 getAttribute ($key)
 Retrieve a single element attribute.
 
 hasAttribute ($key)
 Return true if a specific attribute is set.
 
 setAttributes ($arrayOrTraversable)
 Set many attributes at once.
 
 getAttributes ()
 Retrieve all attributes at once.
 
 setValue ($value)
 Set the value of the element.
 
 getValue ()
 Retrieve the element value.
 
 setLabel ($label)
 Set the label (if any) used for this element.
 
 getLabel ()
 Retrieve the label (if any) used for this element.
 
 setMessages ($messages)
 Set a list of messages to report when validation fails.
 
 getMessages ()
 Get validation error messages, if any.
 

Member Function Documentation

getAttribute (   $key)

Retrieve a single element attribute.

Parameters
string$key
Returns
mixed

Implemented in Element.

getAttributes ( )

Retrieve all attributes at once.

Returns
array|

Implemented in Element, and Csrf.

getLabel ( )

Retrieve the label (if any) used for this element.

Returns
string

Implemented in Element.

getMessages ( )

Get validation error messages, if any.

Returns a list of validation failure messages, if any.

Returns
array|

Implemented in Element.

getName ( )

Retrieve the element name.

Returns
string

Implemented in Element.

getOption (   $option)

return the specified option

Parameters
string$option
Returns
null|mixed

Implemented in Element.

getOptions ( )

get the defined options

Returns
array

Implemented in Element.

getValue ( )

Retrieve the element value.

Returns
mixed

Implemented in Element, MonthSelect, DateTimeSelect, DateSelect, and Csrf.

hasAttribute (   $key)

Return true if a specific attribute is set.

Parameters
string$key
Returns
bool

Implemented in Element.

setAttribute (   $key,
  $value 
)

Set a single element attribute.

Parameters
string$key
mixed$value
Returns
ElementInterface

Implemented in Element, Select, and MultiCheckbox.

setAttributes (   $arrayOrTraversable)

Set many attributes at once.

Implementation will decide if this will overwrite or merge.

Parameters
array | \Traversable$arrayOrTraversable
Returns
ElementInterface

Implemented in Element.

setLabel (   $label)

Set the label (if any) used for this element.

Parameters
$label
Returns
ElementInterface

Implemented in Element.

setMessages (   $messages)

Set a list of messages to report when validation fails.

Parameters
array | \Traversable$messages
Returns
ElementInterface

Implemented in Element, and Fieldset.

setName (   $name)

Set the name of this element.

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

Parameters
string$name
Returns
ElementInterface

Implemented in Element.

setOption (   $key,
  $value 
)

Set a single option for an element.

Parameters
string$key
mixed$value
Returns
self

Implemented in Element.

setOptions (   $options)

Set options for an element.

Parameters
array | \Traversable$options
Returns
ElementInterface

Implemented in Form, Select, Element, Collection, MonthSelect, MultiCheckbox, Fieldset, DateTimeSelect, Checkbox, DateTime, DateSelect, InputFilterProviderFieldset, Csrf, and Captcha.

setValue (   $value)

Set the value of the element.

Parameters
mixed$value
Returns
ElementInterface

Implemented in Element, MonthSelect, DateTimeSelect, Checkbox, MultiCheckbox, and DateSelect.