@@ -64,10 +64,10 @@ A very simple extension may just load configuration files into the container::
64
64
65
65
class AcmeDemoExtension implements ExtensionInterface
66
66
{
67
- public function load(array $configs, ContainerBuilder $container )
67
+ public function load(array $configs, ContainerBuilder $containerBuilder )
68
68
{
69
69
$loader = new XmlFileLoader(
70
- $container ,
70
+ $containerBuilder ,
71
71
new FileLocator(__DIR__.'/../Resources/config')
72
72
);
73
73
$loader->load('services.xml');
@@ -135,7 +135,7 @@ are loaded::
135
135
The values from those sections of the config files are passed into the first
136
136
argument of the ``load() `` method of the extension::
137
137
138
- public function load(array $configs, ContainerBuilder $container )
138
+ public function load(array $configs, ContainerBuilder $containerBuilder )
139
139
{
140
140
$foo = $configs[0]['foo']; //fooValue
141
141
$bar = $configs[0]['bar']; //barValue
@@ -161,7 +161,7 @@ you could access the config value this way::
161
161
use Symfony\Component\Config\Definition\Processor;
162
162
// ...
163
163
164
- public function load(array $configs, ContainerBuilder $container )
164
+ public function load(array $configs, ContainerBuilder $containerBuilder )
165
165
{
166
166
$configuration = new Configuration();
167
167
$processor = new Processor();
@@ -222,13 +222,13 @@ The processed config value can now be added as container parameters as if
222
222
it were listed in a ``parameters `` section of the config file but with the
223
223
additional benefit of merging multiple files and validation of the configuration::
224
224
225
- public function load(array $configs, ContainerBuilder $container )
225
+ public function load(array $configs, ContainerBuilder $containerBuilder )
226
226
{
227
227
$configuration = new Configuration();
228
228
$processor = new Processor();
229
229
$config = $processor->processConfiguration($configuration, $configs);
230
230
231
- $container ->setParameter('acme_demo.FOO', $config['foo']);
231
+ $containerBuilder ->setParameter('acme_demo.FOO', $config['foo']);
232
232
233
233
// ...
234
234
}
@@ -237,14 +237,14 @@ More complex configuration requirements can be catered for in the Extension
237
237
classes. For example, you may choose to load a main service configuration
238
238
file but also load a secondary one only if a certain parameter is set::
239
239
240
- public function load(array $configs, ContainerBuilder $container )
240
+ public function load(array $configs, ContainerBuilder $containerBuilder )
241
241
{
242
242
$configuration = new Configuration();
243
243
$processor = new Processor();
244
244
$config = $processor->processConfiguration($configuration, $configs);
245
245
246
246
$loader = new XmlFileLoader(
247
- $container ,
247
+ $containerBuilder ,
248
248
new FileLocator(__DIR__.'/../Resources/config')
249
249
);
250
250
$loader->load('services.xml');
@@ -295,11 +295,11 @@ method is called by implementing
295
295
{
296
296
// ...
297
297
298
- public function prepend(ContainerBuilder $container )
298
+ public function prepend(ContainerBuilder $containerBuilder )
299
299
{
300
300
// ...
301
301
302
- $container ->prependExtensionConfig($name, $config);
302
+ $containerBuilder ->prependExtensionConfig($name, $config);
303
303
304
304
// ...
305
305
}
@@ -326,7 +326,7 @@ compilation::
326
326
327
327
class AcmeDemoExtension implements ExtensionInterface, CompilerPassInterface
328
328
{
329
- public function process(ContainerBuilder $container )
329
+ public function process(ContainerBuilder $containerBuilder )
330
330
{
331
331
// ... do something during the compilation
332
332
}
@@ -380,7 +380,7 @@ class implementing the ``CompilerPassInterface``::
380
380
381
381
class CustomPass implements CompilerPassInterface
382
382
{
383
- public function process(ContainerBuilder $container )
383
+ public function process(ContainerBuilder $containerBuilder )
384
384
{
385
385
// ... do something during the compilation
386
386
}
0 commit comments