zendframework/zf2 — pull request #6553 by ibekiaris (2014-08-10 21:10:58+00:00)
Title: Method for adding extra identifiers to Abstract Controller Event Manager

I extended the functionallity of Zend\Mvc\Controller\AbstractController because i face the following problem:

There was a need of a Zf2 module with the following structure:

Module Name: Modules

Modules
- src

-- FolderA
-- FolderB

- view

-- foldera
-- folderb

I wanted to disable the layout only for that module. So i need an identifier for that module only.

However namespace configuration was the following

return array(
'Zend\Loader\StandardAutoloader' => array(
'namespaces' => array(
'FolderA' => __DIR__ . '/src/FolderA',
'FolderB' => __DIR__ . '/src/FolderB',
),
),
);

Tha means that identifiers in AbstractController event manager are:

'Zend\Stdlib\DispatchableInterface'
'Zend\Mvc\Controller\AbstractController'
'FolderA\Controller\IndexController'
'AbstractModulesController'
'FolderA' (or FolderB)

So i ve added some lines of code in case someone need to extend AstractActionController and implement his own

"AbstractActionController" class setting also his own identifiers to the event manager.