@@ -61,7 +61,10 @@ A very simple extension may just load configuration files into the container::
61
61
{
62
62
public function load(array $configs, ContainerBuilder $container)
63
63
{
64
- $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
64
+ $loader = new XmlFileLoader(
65
+ $container,
66
+ new FileLocator(__DIR__.'/../Resources/config')
67
+ );
65
68
$loader->load('services.xml');
66
69
}
67
70
@@ -225,7 +228,10 @@ but also load a secondary one only if a certain parameter is set::
225
228
$processor = new Processor();
226
229
$config = $processor->processConfiguration($configuration, $configs);
227
230
228
- $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
231
+ $loader = new XmlFileLoader(
232
+ $container,
233
+ new FileLocator(__DIR__.'/../Resources/config')
234
+ );
229
235
$loader->load('services.xml');
230
236
231
237
if ($config['advanced']) {
@@ -309,7 +315,10 @@ For example, to run your custom pass after the default removal passes have been
309
315
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
310
316
311
317
$container = new ContainerBuilder();
312
- $container->addCompilerPass(new CustomCompilerPass, PassConfig::TYPE_AFTER_REMOVING);
318
+ $container->addCompilerPass(
319
+ new CustomCompilerPass,
320
+ PassConfig::TYPE_AFTER_REMOVING
321
+ );
313
322
314
323
.. _components-dependency-injection-dumping :
315
324
@@ -357,7 +366,10 @@ it::
357
366
$container->compile();
358
367
359
368
$dumper = new PhpDumper($container);
360
- file_put_contents($file, $dumper->dump(array('class' => 'MyCachedContainer')));
369
+ file_put_contents(
370
+ $file,
371
+ $dumper->dump(array('class' => 'MyCachedContainer'))
372
+ );
361
373
}
362
374
363
375
You will now get the speed of the PHP configured container with the ease of using
@@ -386,7 +398,10 @@ but getting an up to date configuration whilst developing your application::
386
398
387
399
if (!$isDebug) {
388
400
$dumper = new PhpDumper($container);
389
- file_put_contents($file, $dumper->dump(array('class' => 'MyCachedContainer')));
401
+ file_put_contents(
402
+ $file,
403
+ $dumper->dump(array('class' => 'MyCachedContainer'))
404
+ );
390
405
}
391
406
}
392
407
0 commit comments