Skip to content

Instantly share code, notes, and snippets.

@shanestillwell
Created January 3, 2011 17:22
Show Gist options
  • Save shanestillwell/763710 to your computer and use it in GitHub Desktop.
Save shanestillwell/763710 to your computer and use it in GitHub Desktop.
Edit the Bootstrap for the Zend Tool to pull the APPLICATION_ENV from the shell.
--- BootstrapFile.php (saved version)
+++ (current document)
@@ -106,9 +106,11 @@
define('APPLICATION_PATH', $this->_applicationDirectory->getPath());
$applicationOptions = array();
$applicationOptions['config'] = $this->_applicationConfigFile->getPath();
+
+ $env = getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development';
$this->_applicationInstance = new Zend_Application(
- 'development',
+ $env,
$applicationOptions
);
}
,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment