title: How to get a bootstrap resource in a controller plugin in Zend Framework
body: <pre><code>protected function _initDatabase()
  {
       $params = array(
              'host'     =&gt; '',
              'username' =&gt; '',
              'password' =&gt; '',
              'dbname'   =&gt; '',
          );
  
      $database = Zend_Db::factory('PDO_MYSQL', $params);
      $database-&gt;getConnection();
      return $database;
  }
  </code></pre>
  
  <p>.</p>
  
  <pre><code>class App_Controller_Plugin_Test extends Zend_Controller_Plugin_Abstract
  {
      public function preDispatch(Zend_Controller_Request_Http $request)
      {
          // how i get database?
  
      }
  }
  </code></pre>