Hi,
I'm wondering if it's the wanted behaviour
public function onBootstrap(MvcEvent $e)
    {
        $eventManager        = $e->getApplication()->getEventManager();
        $eventManager->attach('route', array($this, 'loadConfiguration'),
2);
        //you can attach other function need here...
    }
 
    public function loadConfiguration(MvcEvent $e)
    {
        $application   = $e->getApplication();
        $sm            = $application->getServiceManager();
        $sharedManager =
$application->getEventManager()->getSharedManager();
        $router = $sm->get('router');
        $request = $sm->get('request');
        $matchedRoute = $router->match($request);
        if (null !== $matchedRoute) {
            // I get module name instead of the controller name
            var_dump($matchedRoute->getParam('controller'));
           // do something
        }
    }



--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/zf2-matched-route-getParam-controller-get-the-module-instead-tp4659689.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to