I know with ZF1 you would retrieve the module/controller name using custom View Helpers that would get the singleton frontController object and get the name there.
U
instead of extending onBootStrap() in Module.php, you can use getViewHelperConfig() (also in Module.php). The actual helper is unchanged, but you get the following code to create it:
public function getViewHelperConfig()
{
return array(
'factories' => array(
'ControllerName' => function ($sm) {
$match = $sm->getServiceLocator()->get('application')->getMvcEvent()->getRouteMatch();
$viewHelper = new \Application\View\Helper\ControllerName($match);
return $viewHelper;
},
),
);
}