title: Zend Framework 2 Doctrine 2 BJ Younglbood Profiler Reports Undefined index db
body: <p>I'm setting up a new Zend Framework 2 Doctrine 2 app and have included BJ Youngblood's profiler.  However, after including it, I now receive the error <code>Undefined index: db</code> in <code>ProfilingAdapterFactory.php</code>.  My doctrine.local.php in /config/autoload contains all my database parameters.  The contents of ProfilingAdapterFactory that have not been edited are as follows:</p>
  
  <pre><code>public function createService(ServiceLocatorInterface $serviceLocator)
  {
      $config = $serviceLocator-&gt;get('Configuration');
      $dbParams = $config['db'];
      $adapter = new ProfilingAdapter($dbParams);
  
      $adapter-&gt;setProfiler(new Profiler);
      if (isset($dbParams['options']) &amp;&amp; is_array($dbParams['options'])) {
          $options = $dbParams['options'];
      } else {
          $options = array();
      }
      $adapter-&gt;injectProfilingStatementPrototype($options);
      return $adapter;
  }
  </code></pre>
  
  <p>How do I adjust the ProfiliingAdapterFactory.php to see the doctrine database parameters?</p>