Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2019-12-17 22:29:12 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2019-12-17 22:29:12 +0300
commit2344b0eac868c933d1200995047531534a91523d (patch)
treecc631f43da58a19092c490d0b283d8516914bfd7 /core
parent4cc5cd6d8c0f73f8d1fbdd5f38ae0ff4971d8e0d (diff)
Couple tweaks to Environment class so current environment name can be easily queried. (#15279)
Diffstat (limited to 'core')
-rw-r--r--core/Application/Environment.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/Application/Environment.php b/core/Application/Environment.php
index 65d1ae53e4..1aff56b05f 100644
--- a/core/Application/Environment.php
+++ b/core/Application/Environment.php
@@ -80,6 +80,11 @@ class Environment
$this->definitions = $definitions;
}
+ public function getEnvironmentName()
+ {
+ return $this->environment;
+ }
+
/**
* Initializes the kernel globals and DI container.
*/
@@ -88,6 +93,7 @@ class Environment
$this->invokeBeforeContainerCreatedHook();
$this->container = $this->createContainer();
+ $this->container->set(self::class, $this);
StaticContainer::push($this->container);