Answer the question
In order to leave comments, you need to log in
ZF2, bjyauthorize, Restful module - how to get method name (get, getList, delete...) before executing it?
So I get only the controller:
$sm = $e->getApplication()->getServiceManager();
/** @var \Zend\Mvc\Application $application */
$application = $e->getApplication();
$eventManager = $application->getEventManager();
$eventManager->attach('route', function(MvcEvent $mvcEvent){
$params = $mvcEvent->getRouteMatch()->getParams();
});
$sm = $e->getApplication()->getServiceManager();
/** @var \Zend\Mvc\Application $application */
$application = $e->getApplication();
$eventManager = $application->getEventManager();
$eventManager->attach('dispatch', function(MvcEvent $mvcEvent){
$params = $mvcEvent->getRouteMatch()->getParams();
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question