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

Public Member Functions

 setData ($data)
 Set data to validate and/or populate elements.
 
 bind ($object, $flags=FormInterface::VALUES_NORMALIZED)
 Bind an object to the element.
 
 setBindOnValidate ($bindOnValidateFlag)
 Whether or not to bind values to the bound object when validation succeeds.
 
 setInputFilter (InputFilterInterface $inputFilter)
 Set input filter.
 
 getInputFilter ()
 Retrieve input filter.
 
 isValid ()
 Validate the form.
 
 getData ($flag=FormInterface::VALUES_NORMALIZED)
 Retrieve the validated data.
 
 setValidationGroup ()
 Set the validation group (set of values to validate)
 
- Public Member Functions inherited from FieldsetInterface
 add ($elementOrFieldset, array $flags=[])
 Add an element or fieldset.
 
 has ($elementOrFieldset)
 Does the fieldset have an element/fieldset by the given name?
 
 get ($elementOrFieldset)
 Retrieve a named element or fieldset.
 
 remove ($elementOrFieldset)
 Remove a named element or fieldset.
 
 setPriority ($elementOrFieldset, $priority)
 Set/change the priority of an element or fieldset.
 
 getElements ()
 Retrieve all attached elements.
 
 getFieldsets ()
 Retrieve all attached fieldsets.
 
 populateValues ($data)
 Recursively populate value attributes of elements.
 
 setObject ($object)
 Set the object used by the hydrator.
 
 getObject ()
 Get the object used by the hydrator.
 
 allowObjectBinding ($object)
 Checks if the object can be set in this fieldset.
 
 setHydrator (HydratorInterface $hydrator)
 Set the hydrator to use when binding an object to the element.
 
 getHydrator ()
 Get the hydrator used when binding an object to the element.
 
 bindValues (array $values=[])
 Bind values to the bound object.
 
 allowValueBinding ()
 Checks if this fieldset can bind data.
 
- Public Member Functions inherited from ElementInterface
 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.
 
- Public Member Functions inherited from ElementPrepareAwareInterface
 prepareElement (FormInterface $form)
 Prepare the form element (mostly used for rendering purposes)
 
- Public Member Functions inherited from FormFactoryAwareInterface
 setFormFactory (Factory $factory)
 Compose a form factory into the object.
 

Public Attributes

const BIND_ON_VALIDATE = 0x00
 
const BIND_MANUAL = 0x01
 
const VALIDATE_ALL = 0x10
 
const VALUES_NORMALIZED = 0x11
 
const VALUES_RAW = 0x12
 
const VALUES_AS_ARRAY = 0x13
 

Member Function Documentation

bind (   $object,
  $flags = FormInterface::VALUES_NORMALIZED 
)

Bind an object to the element.

Allows populating the object with validated values.

Parameters
object$object
int$flags
Returns
mixed

Implemented in Form.

getData (   $flag = FormInterface::VALUES_NORMALIZED)

Retrieve the validated data.

By default, retrieves normalized values; pass one of the VALUES_* constants to shape the behavior.

Parameters
int$flag
Returns
array|object

Implemented in Form.

getInputFilter ( )

Retrieve input filter.

Returns
InputFilterInterface

Implemented in Form.

isValid ( )

Validate the form.

Typically, will proxy to the composed input filter.

Returns
bool

Implemented in Form.

setBindOnValidate (   $bindOnValidateFlag)

Whether or not to bind values to the bound object when validation succeeds.

Parameters
int$bindOnValidateFlag
Returns
void

Implemented in Form.

setData (   $data)

Set data to validate and/or populate elements.

Typically, also passes data on to the composed input filter.

Parameters
array | \ArrayAccess$data
Returns
FormInterface

Implemented in Form.

setInputFilter ( InputFilterInterface  $inputFilter)

Set input filter.

Parameters
InputFilterInterface$inputFilter
Returns
FormInterface

Implemented in Form.

setValidationGroup ( )

Set the validation group (set of values to validate)

Typically, proxies to the composed input filter

Returns
FormInterface

Implemented in Form.

Member Data Documentation

const BIND_MANUAL = 0x01
const BIND_ON_VALIDATE = 0x00
const VALIDATE_ALL = 0x10
const VALUES_AS_ARRAY = 0x13
const VALUES_NORMALIZED = 0x11
const VALUES_RAW = 0x12