Zend Framework  3.0
Public Member Functions | List of all members
ElementAnnotationsListener Class Reference

Default listeners for element annotations. More...

Public Member Functions

 attach (EventManagerInterface $events, $priority=1)
 Attach one or more listeners.Implementors may add an optional $priority argument; the EventManager implementation will pass this to the aggregate.
Parameters
EventManagerInterface$events
int$priority
Returns
void

 
 handleAllowEmptyAnnotation ($e)
 Handle the AllowEmpty annotation.
 
 handleAttributesAnnotation ($e)
 Handle the Attributes annotation.
 
 handleComposedObjectAnnotation ($e)
 Allow creating fieldsets from composed entity properties.
 
 handleContinueIfEmptyAnnotation ($e)
 Handle the ContinueIfEmpty annotation.
 
 handleErrorMessageAnnotation ($e)
 Handle the ErrorMessage annotation.
 
 handleExcludeAnnotation ($e)
 Determine if the element has been marked to exclude from the definition.
 
 handleFilterAnnotation ($e)
 Handle the Filter annotation.
 
 handleFlagsAnnotation ($e)
 Handle the Flags annotation.
 
 handleHydratorAnnotation ($e)
 Handle the Hydrator annotation.
 
 handleInputAnnotation ($e)
 Handle the Input annotation.
 
 handleObjectAnnotation ($e)
 Handle the Object and Instance annotations.
 
 handleOptionsAnnotation ($e)
 Handle the Options annotation.
 
 handleRequiredAnnotation ($e)
 Handle the Required annotation.
 
 handleTypeAnnotation ($e)
 Handle the Type annotation.
 
 handleValidatorAnnotation ($e)
 Handle the Validator annotation.
 
- Public Member Functions inherited from AbstractAnnotationsListener
 handleNameAnnotation ($e)
 Attempt to discover a name set via annotation.
 
 discoverFallbackName ($e)
 Discover the fallback name via reflection.
 
- Public Member Functions inherited from AbstractListenerAggregate
 detach (EventManagerInterface $events)
 Detach all previously attached listeners.
Parameters
EventManagerInterface$events
Returns
void

 

Additional Inherited Members

- Protected Attributes inherited from AbstractListenerAggregate
 $listeners = []
 

Detailed Description

Default listeners for element annotations.

Defines and attaches a set of default listeners for element annotations (which are defined on object properties). These include:

See the individual annotation classes for more details. The handlers registered work with the annotation values, as well as the element and input specification passed in the event object.

Member Function Documentation

attach ( EventManagerInterface  $events,
  $priority = 1 
)

Attach one or more listeners.Implementors may add an optional $priority argument; the EventManager implementation will pass this to the aggregate.

Parameters
EventManagerInterface$events
int$priority
Returns
void

Implements ListenerAggregateInterface.

handleAllowEmptyAnnotation (   $e)

Handle the AllowEmpty annotation.

Sets the allow_empty flag on the input specification array.

Parameters
\Zend\EventManager\EventInterface$e
Returns
void
handleAttributesAnnotation (   $e)

Handle the Attributes annotation.

Sets the attributes array of the element specification.

Parameters
\Zend\EventManager\EventInterface$e
Returns
void
handleComposedObjectAnnotation (   $e)

Allow creating fieldsets from composed entity properties.

Parameters
\Zend\EventManager\EventInterface$e
Returns
void
handleContinueIfEmptyAnnotation (   $e)

Handle the ContinueIfEmpty annotation.

Sets the continue_if_empty flag on the input specification array.

Parameters
\Zend\EventManager\EventInterface$e
Returns
void
handleErrorMessageAnnotation (   $e)

Handle the ErrorMessage annotation.

Sets the error_message of the input specification.

Parameters
\Zend\EventManager\EventInterface$e
Returns
void
handleExcludeAnnotation (   $e)

Determine if the element has been marked to exclude from the definition.

Parameters
\Zend\EventManager\EventInterface$e
Returns
bool
handleFilterAnnotation (   $e)

Handle the Filter annotation.

Adds a filter to the filter chain specification for the input.

Parameters
\Zend\EventManager\EventInterface$e
Returns
void
handleFlagsAnnotation (   $e)

Handle the Flags annotation.

Sets the element flags in the specification (used typically for setting priority).

Parameters
\Zend\EventManager\EventInterface$e
Returns
void
handleHydratorAnnotation (   $e)

Handle the Hydrator annotation.

Sets the hydrator class to use in the fieldset specification.

Parameters
\Zend\EventManager\EventInterface$e
Returns
void
handleInputAnnotation (   $e)

Handle the Input annotation.

Sets the filter specification for the current element to the specified input class name.

Parameters
\Zend\EventManager\EventInterface$e
Returns
void
handleObjectAnnotation (   $e)

Handle the Object and Instance annotations.

Sets the object to bind to the form or fieldset

Parameters
\Zend\EventManager\EventInterface$e
Returns
void
handleOptionsAnnotation (   $e)

Handle the Options annotation.

Sets the element options in the specification.

Parameters
\Zend\EventManager\EventInterface$e
Returns
void
handleRequiredAnnotation (   $e)

Handle the Required annotation.

Sets the required flag on the input based on the annotation value.

Parameters
\Zend\EventManager\EventInterface$e
Returns
void
handleTypeAnnotation (   $e)

Handle the Type annotation.

Sets the element class type to use in the element specification.

Parameters
\Zend\EventManager\EventInterface$e
Returns
void
handleValidatorAnnotation (   $e)

Handle the Validator annotation.

Adds a validator to the validator chain of the input specification.

Parameters
\Zend\EventManager\EventInterface$e
Returns
void