mirror of
https://github.com/jimeh/zynapse.git
synced 2026-02-19 07:06:39 +00:00
Changed the environment property name from "env" to "environment" in ActiveEnvironment.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
# configurations.
|
||||
#
|
||||
# ( development | test | staging | production )
|
||||
$this->env = 'development';
|
||||
$this->environment = 'development';
|
||||
|
||||
|
||||
# Default server display mode - Overridden by host
|
||||
|
||||
8
vendor/zynapse/action_environment.php
vendored
8
vendor/zynapse/action_environment.php
vendored
@@ -36,7 +36,7 @@ class ActionEnvironment {
|
||||
public
|
||||
|
||||
# Main
|
||||
$env,
|
||||
$environment,
|
||||
$mode,
|
||||
$root,
|
||||
|
||||
@@ -67,7 +67,7 @@ class ActionEnvironment {
|
||||
require_once(ZNAP_CONFIG . "/hosts.php");
|
||||
$host = $this->match_to_host($hosts);
|
||||
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['root']) ) {
|
||||
if ( !empty($_SERVER['REQUEST_URI']) ) $_SERVER['REQUEST_URI'] = '/'.$host['root'].$_SERVER['REQUEST_URI'];
|
||||
@@ -77,7 +77,7 @@ class ActionEnvironment {
|
||||
}
|
||||
|
||||
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 () {
|
||||
@@ -98,7 +98,7 @@ class ActionEnvironment {
|
||||
|
||||
function define_constants () {
|
||||
if ( !defined("ZNAP_ENV") ) {
|
||||
define("ZNAP_ENV", $this->env);
|
||||
define("ZNAP_ENV", $this->environment);
|
||||
}
|
||||
if ( !defined("ZNAP_MODE") ) {
|
||||
define("ZNAP_MODE", $this->mode);
|
||||
|
||||
2
vendor/zynapse/zynapse.php
vendored
2
vendor/zynapse/zynapse.php
vendored
@@ -55,7 +55,7 @@ class Zynapse {
|
||||
self::$base->env =& self::$env;
|
||||
|
||||
echo "hello world<br />\n";
|
||||
echo self::$env->env;
|
||||
echo self::$env->environment;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user