aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/di
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-10-04 17:47:36 +0200
committerTristan Darricau <github@nicofuma.fr>2014-11-20 20:59:55 +0100
commit0b61e3540de353f2bf0a6904a87727e4efe9c5fa (patch)
treed1c30153a8e82858a3ee838c93db496e868c74db /phpBB/phpbb/di
parent3a167aa0c3eaec6c4b9d322460480786234e0419 (diff)
downloadforums-0b61e3540de353f2bf0a6904a87727e4efe9c5fa.tar
forums-0b61e3540de353f2bf0a6904a87727e4efe9c5fa.tar.gz
forums-0b61e3540de353f2bf0a6904a87727e4efe9c5fa.tar.bz2
forums-0b61e3540de353f2bf0a6904a87727e4efe9c5fa.tar.xz
forums-0b61e3540de353f2bf0a6904a87727e4efe9c5fa.zip
[ticket/12620] Fix tests
PHPBB3-12620
Diffstat (limited to 'phpBB/phpbb/di')
-rw-r--r--phpBB/phpbb/di/container_builder.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/phpBB/phpbb/di/container_builder.php b/phpBB/phpbb/di/container_builder.php
index 5ad9336695..6216dad978 100644
--- a/phpBB/phpbb/di/container_builder.php
+++ b/phpBB/phpbb/di/container_builder.php
@@ -195,6 +195,8 @@ class container_builder
$loader = new YamlFileLoader($this->container, new FileLocator(phpbb_realpath($this->get_config_path())));
$loader->load(PHPBB_ENVIRONMENT . '/config.yml');
+ $this->inject_custom_parameters();
+
if ($this->compile_container)
{
$this->container->compile();
@@ -431,6 +433,20 @@ class container_builder
}
/**
+ * Inject the customs parameters into the container
+ */
+ protected function inject_custom_parameters()
+ {
+ if ($this->custom_parameters !== null)
+ {
+ foreach ($this->custom_parameters as $key => $value)
+ {
+ $this->container->setParameter($key, $value);
+ }
+ }
+ }
+
+ /**
* Returns the core parameters.
*
* @return array An array of core parameters