Abstract aggregate listener

package Default
inherited_from \Zend\EventManager\AbstractListenerAggregate

 Methods

{@inheritDoc}

attach(\Zend\EventManager\EventManagerInterface $events) 

Parameters

$events

Detach all previously attached listeners

detach(\Zend\EventManager\EventManagerInterface $events) 
Inherited
inherited_from \Zend\EventManager\ListenerAggregateInterface::detach()

Parameters

$events

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

$e

\Zend\Mvc\MvcEvent

isPreferRouteMatchController()

isPreferRouteMatchController() : boolean

Returns

boolean

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\InjectTemplateListener
fluent This method is part of a fluent interface and will return the same instance

Parameters

$map

array

Returns

\Zend\Mvc\View\Http\InjectTemplateListener

Sets the flag to instruct the listener to prefer the route match controller param over the class name

setPreferRouteMatchController(boolean $preferRouteMatchController) 

Parameters

$preferRouteMatchController

boolean

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

Default

array()
 

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

$inflector : mixed

Default

 

$listeners

$listeners : array<mixed,\Zend\Stdlib\CallbackHandler>

Default

array()
 

Flag to force the use of the route match controller param

$preferRouteMatchController : boolean

Default

false