title: How can I refer to different environment's inside Symfony's ProjectConfiguration.class.php
body: <p>I have a staging and development environment on the same machine. I would like to configure a different memcached port in ProjectConfiguration.class.php depending on my environment. I imagine its not safe to use $SERVER['HTTP_HOST'] inside of the ProjectConfiguration file because that won't account for tasks run from the command line.</p>
  
  <p>What would be the best way to accomplish what this bit of code intends:</p>
  
  <pre><code>public function configureDoctrine(Doctrine_Manager $manager) {
  
      if ($_SERVER['HTTP_HOST'] == 'dev.example.com') {
        $memcached_port = 11211;
      } else {
        $memcached_port = 11212;
      }
  
      $servers = array(
          'host' =&gt; '127.0.0.1',
          'port' =&gt; $memcached_port,
          'persistent' =&gt; true);
  }
  </code></pre>