I'm trying to use the router for friendly URLs. I'm following this tutorial:
http://sourcecodebean.com/archives/friendly-urls-and-the-zend-router/31
It tells me to add this to my bootstrap:
$config = new Zend_Config_Ini(APPLICATION_PATH . ‘/config/routes.ini’);
$router = $frontController->getRouter();
$router->addConfig($config,‘routes’);
However my bootstrap looks like this:
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAutoload()
{
$moduleLoader = new Zend_Application_Module_Autoloader(array(
'namespace' => '',
'basePath' => APPLICATION_PATH));
return $moduleLoader;
}
function _initViewHelpers()
{
$this->bootstrap('layout');
$layout = $this->getResource('layout');
$view = $layout->getView();
}
}
Where do I create the router?
Thanks,
Corey
--
View this message in context:
http://n4.nabble.com/Where-to-instantiate-router-in-my-bootstrap-tp1009683p1009683.html
Sent from the Zend Framework mailing list archive at Nabble.com.