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

Public Member Functions

 attach (EventManagerInterface $events, $priority=1)
 Attach to an event manager.
 
 onRoute (MvcEvent $e)
 Listen to the "route" event and determine if the module namespace should be prepended to the controller name.
 
- Public Member Functions inherited from AbstractListenerAggregate
 detach (EventManagerInterface $events)
 Detach all previously attached listeners.
Parameters
EventManagerInterface$events
Returns
void

 

Public Attributes

const MODULE_NAMESPACE = '__NAMESPACE__'
 
const ORIGINAL_CONTROLLER = '__CONTROLLER__'
 

Additional Inherited Members

- Protected Attributes inherited from AbstractListenerAggregate
 $listeners = []
 

Member Function Documentation

attach ( EventManagerInterface  $events,
  $priority = 1 
)

Attach to an event manager.

Parameters
EventManagerInterface$events
int$priority

Implements ListenerAggregateInterface.

onRoute ( MvcEvent  $e)

Listen to the "route" event and determine if the module namespace should be prepended to the controller name.

If the route match contains a parameter key matching the MODULE_NAMESPACE constant, that value will be prepended, with a namespace separator, to the matched controller parameter.

Parameters
MvcEvent$e
Returns
null

Member Data Documentation

const MODULE_NAMESPACE = '__NAMESPACE__'
const ORIGINAL_CONTROLLER = '__CONTROLLER__'