Changed the environment property name from "env" to "environment" in ActiveEnvironment.

This commit is contained in:
2009-08-16 12:40:01 +03:00
parent 89c624f084
commit 91cacf2f89
3 changed files with 6 additions and 6 deletions

View File

@@ -12,7 +12,7 @@
# configurations. # configurations.
# #
# ( development | test | staging | production ) # ( development | test | staging | production )
$this->env = 'development'; $this->environment = 'development';
# Default server display mode - Overridden by host # Default server display mode - Overridden by host

View File

@@ -36,7 +36,7 @@ class ActionEnvironment {
public public
# Main # Main
$env, $environment,
$mode, $mode,
$root, $root,
@@ -67,7 +67,7 @@ class ActionEnvironment {
require_once(ZNAP_CONFIG . "/hosts.php"); require_once(ZNAP_CONFIG . "/hosts.php");
$host = $this->match_to_host($hosts); $host = $this->match_to_host($hosts);
if ( !empty($host) ) { if ( !empty($host) ) {
if ( !empty($host['environment']) ) $this->env = $host['environment']; if ( !empty($host['environment']) ) $this->environment = $host['environment'];
if ( !empty($host['mode']) ) $this->mode = $host['mode']; if ( !empty($host['mode']) ) $this->mode = $host['mode'];
if ( !empty($host['root']) ) { if ( !empty($host['root']) ) {
if ( !empty($_SERVER['REQUEST_URI']) ) $_SERVER['REQUEST_URI'] = '/'.$host['root'].$_SERVER['REQUEST_URI']; if ( !empty($_SERVER['REQUEST_URI']) ) $_SERVER['REQUEST_URI'] = '/'.$host['root'].$_SERVER['REQUEST_URI'];
@@ -77,7 +77,7 @@ class ActionEnvironment {
} }
function load_environment_specific_file () { function load_environment_specific_file () {
require_once(ZNAP_CONFIG . "/environments/". $this->env . ".php"); require_once(ZNAP_CONFIG . "/environments/". $this->environment . ".php");
} }
function set_include_paths () { function set_include_paths () {
@@ -98,7 +98,7 @@ class ActionEnvironment {
function define_constants () { function define_constants () {
if ( !defined("ZNAP_ENV") ) { if ( !defined("ZNAP_ENV") ) {
define("ZNAP_ENV", $this->env); define("ZNAP_ENV", $this->environment);
} }
if ( !defined("ZNAP_MODE") ) { if ( !defined("ZNAP_MODE") ) {
define("ZNAP_MODE", $this->mode); define("ZNAP_MODE", $this->mode);

View File

@@ -55,7 +55,7 @@ class Zynapse {
self::$base->env =& self::$env; self::$base->env =& self::$env;
echo "hello world<br />\n"; echo "hello world<br />\n";
echo self::$env->env; echo self::$env->environment;
} }
} }