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
diff options
context:
space:
mode:
authorMatthieu Napoli <matthieu@mnapoli.fr>2014-12-29 10:03:26 +0300
committerMatthieu Napoli <matthieu@mnapoli.fr>2015-01-05 05:24:45 +0300
commitde06fd66ee7d01832ff08f13d58e21a9d7a510c7 (patch)
tree07421e1a36621c77a22d0254c2511b48d2cc0e4f /core/Container
parentcb68ad1ede299ce826989858171456b82a6f7ee5 (diff)
Refactored the way translations are loaded
Translations are now lazily loaded instead of being explicitely loaded by other components (e.g. the front controller, the plugin manager, etc...). Now other parties only configure "directories" where the translator can find translations. That makes the translator decoupled from the rest of Piwik.
Diffstat (limited to 'core/Container')
-rw-r--r--core/Container/ContainerFactory.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/Container/ContainerFactory.php b/core/Container/ContainerFactory.php
index f0414452b7..bf3b157ba8 100644
--- a/core/Container/ContainerFactory.php
+++ b/core/Container/ContainerFactory.php
@@ -12,6 +12,7 @@ use DI\Container;
use DI\ContainerBuilder;
use Doctrine\Common\Cache\ArrayCache;
use Piwik\Config;
+use Piwik\Development;
/**
* Creates a configured DI container.
@@ -55,6 +56,11 @@ class ContainerFactory
// Global config
$builder->addDefinitions(PIWIK_USER_PATH . '/config/global.php');
+ // Development config
+ if (Development::isEnabled()) {
+ $builder->addDefinitions(PIWIK_USER_PATH . '/config/environment/dev.php');
+ }
+
// User config
if (file_exists(PIWIK_USER_PATH . '/config/config.php')) {
$builder->addDefinitions(PIWIK_USER_PATH . '/config/config.php');