You could also do the following: 1. Store your map of host names and environments in an .ini file (e.g. /application/configs/environment.ini) or the like (yml, Php array), e.g.
[environment] production[] = "example.com" testing[] = "testing.example.com" staging[] = "staging.example.com" development[] = "dev.example.dev" development[] = "develop.example.dev" (you get the idea) 2. In your application's entry point (e.g. /public/index.php) perform your checks (is an environment variable set? is a constant defined?) as you're used to. 3. If the environment could not be determined from these, instantiate an Environment object which you feed with these configuration values (or a string pointing to the environment configuration file) and which attempts to determine the environment with this map and information pulled from $_SERVER (will not work when you're running scripts in the console). 4. Construct your Zend_Application, bootstrap and run as you're used to. Best regards, Andreas -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
