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