1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 15:01:33 +02:00

[ticket/12775] Add a conter_factory class and remove functions_container

PHPBB3-12775
This commit is contained in:
Tristan Darricau
2014-06-26 16:39:01 +02:00
parent f8eca98b3f
commit cdf87e0078
3 changed files with 373 additions and 9 deletions

View File

@@ -21,9 +21,12 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
*/
class config extends Extension
{
public function __construct($config_file)
/** @var array */
protected $config_file_data;
public function __construct($config_file_data)
{
$this->config_file = $config_file;
$this->config_file_data = $config_file_data;
}
/**
@@ -36,7 +39,7 @@ class config extends Extension
*/
public function load(array $config, ContainerBuilder $container)
{
require($this->config_file);
extract($this->config_file_data);
$container->setParameter('core.adm_relative_path', (isset($phpbb_adm_relative_path) ? $phpbb_adm_relative_path : 'adm/'));
$container->setParameter('core.table_prefix', $table_prefix);