| 148 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/*
|
|
|
4 |
* This file is part of the Symfony package.
|
|
|
5 |
*
|
|
|
6 |
* (c) Fabien Potencier <fabien@symfony.com>
|
|
|
7 |
*
|
|
|
8 |
* For the full copyright and license information, please view the LICENSE
|
|
|
9 |
* file that was distributed with this source code.
|
|
|
10 |
*/
|
|
|
11 |
|
|
|
12 |
namespace Symfony\Component\HttpKernel\DependencyInjection;
|
|
|
13 |
|
|
|
14 |
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
|
15 |
|
|
|
16 |
/**
|
|
|
17 |
* This extension sub-class provides first-class integration with the
|
|
|
18 |
* Config/Definition Component.
|
|
|
19 |
*
|
|
|
20 |
* You can use this as base class if
|
|
|
21 |
*
|
|
|
22 |
* a) you use the Config/Definition component for configuration,
|
|
|
23 |
* b) your configuration class is named "Configuration", and
|
|
|
24 |
* c) the configuration class resides in the DependencyInjection sub-folder.
|
|
|
25 |
*
|
|
|
26 |
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
|
|
|
27 |
*/
|
|
|
28 |
abstract class ConfigurableExtension extends Extension
|
|
|
29 |
{
|
|
|
30 |
final public function load(array $configs, ContainerBuilder $container)
|
|
|
31 |
{
|
|
|
32 |
$this->loadInternal($this->processConfiguration($this->getConfiguration($configs, $container), $configs), $container);
|
|
|
33 |
}
|
|
|
34 |
|
|
|
35 |
/**
|
|
|
36 |
* Configures the passed container according to the merged configuration.
|
|
|
37 |
*/
|
|
|
38 |
abstract protected function loadInternal(array $mergedConfig, ContainerBuilder $container);
|
|
|
39 |
}
|