Abstract aggregate listener

 Methods

Attach one or more listeners

attach(\Zend\EventManager\EventManagerInterface $events) : void

Implementors may add an optional $priority argument; the EventManager implementation will pass this to the aggregate.

Parameters

Detach all previously attached listeners

detach(\Zend\EventManager\EventManagerInterface $events) : void
Inherited

inherited_from \Zend\EventManager\AbstractListenerAggregate::detach()

Parameters

Inject a template into the view model, if none present

injectTemplate(\Zend\Mvc\MvcEvent $e) : void

Template is derived from the controller found in the route match, and, optionally, the action, if present.

Parameters

Maps controller to template if controller namespace is whitelisted or mapped

mapController(string $controller) : string | false

Parameters

$controller

string

controller FQCN

Returns

stringfalsetemplate name or false if controller was not matched

Set map of controller namespace -> template pairs

setControllerMap(array $map) : \Zend\Mvc\View\Http\self

Parameters

$map

array

Returns

\Zend\Mvc\View\Http\self

Determine the name of the controller

deriveControllerClass(string $controller) : string

Strip the namespace, and the suffix "Controller" if present.

Parameters

$controller

string

Returns

string

deriveControllerSubNamespace()

deriveControllerSubNamespace($namespace) : string

Parameters

$namespace

Returns

string

Determine the top-level namespace of the controller

deriveModuleNamespace(string $controller) : string

Parameters

$controller

string

Returns

string

Inflect a name to a normalized value

inflectName(string $name) : string

Parameters

$name

string

Returns

string

 Properties

 

Array of controller namespace -> template mappings

$controllerMap : array

 

FilterInterface/inflector used to normalize names for use as template identifiers

$inflector : mixed

 

$listeners

$listeners : \Zend\Stdlib\CallbackHandler[]
Inherited

inherited_from \Zend\EventManager\AbstractListenerAggregate::$$listeners