title: Changing database config for Magento environments
body: <p>Hey I'm trying to launch Magento on EngineYard.  Everything works fine except I'm trying to find a way to determine which environment you are currently in and setting dynamic database config for it.</p>
  
  <p>Basically something like this:</p>
  
  <pre><code>if($_SERVER['PHP_ENV' == 'development'){
      // Use a different database config 
  }
  </code></pre>
  
  <p>This is pretty trivial in other frameworks like Cakephp, Yii, etc but I couldn't find anything specific on how to do this for Magento.</p>
  
  <p>Can anyone point me in the right direction for to get this working?  Just trying to save from having to switch the db connection variables back and forth.</p>