Hi,
I'm trying to implement routes into my bootstrap file with this code ;
protected function _initRoutes()
{
$router = $this->getResource('frontController')->getRouter();
$router->addRoute(
'profil',
new Zend_Controller_Router_Route
(
'profil/:username',
array
(
'controller' => 'users',
'action' => 'profil'
)
)
);
}
but it doesn't work since I get 'Call to a member function getRouter() on a non-object in...' error.
How can I get the controller from bootstrap ?