@@ -59,7 +59,10 @@ A very simple extension may just load configuration files into the container::
59
59
{
60
60
public function load(array $configs, ContainerBuilder $container)
61
61
{
62
- $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
62
+ $loader = new XmlFileLoader(
63
+ $container,
64
+ new FileLocator(__DIR__.'/../Resources/config')
65
+ );
63
66
$loader->load('services.xml');
64
67
}
65
68
@@ -223,7 +226,10 @@ but also load a secondary one only if a certain parameter is set::
223
226
$processor = new Processor();
224
227
$config = $processor->processConfiguration($configuration, $configs);
225
228
226
- $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
229
+ $loader = new XmlFileLoader(
230
+ $container,
231
+ new FileLocator(__DIR__.'/../Resources/config')
232
+ );
227
233
$loader->load('services.xml');
228
234
229
235
if ($config['advanced']) {
@@ -305,7 +311,10 @@ For example, to run your custom pass after the default removal passes have been
305
311
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
306
312
307
313
$container = new ContainerBuilder();
308
- $container->addCompilerPass(new CustomCompilerPass, PassConfig::TYPE_AFTER_REMOVING);
314
+ $container->addCompilerPass(
315
+ new CustomCompilerPass,
316
+ PassConfig::TYPE_AFTER_REMOVING
317
+ );
309
318
310
319
Dumping the Configuration for Performance
311
320
-----------------------------------------
@@ -351,7 +360,10 @@ it::
351
360
$container->compile();
352
361
353
362
$dumper = new PhpDumper($container);
354
- file_put_contents($file, $dumper->dump(array('class' => 'MyCachedContainer')));
363
+ file_put_contents(
364
+ $file,
365
+ $dumper->dump(array('class' => 'MyCachedContainer'))
366
+ );
355
367
}
356
368
357
369
You will now get the speed of the PHP configured container with the ease of using
@@ -380,7 +392,10 @@ but getting an up to date configuration whilst developing your application::
380
392
381
393
if (!$isDebug) {
382
394
$dumper = new PhpDumper($container);
383
- file_put_contents($file, $dumper->dump(array('class' => 'MyCachedContainer')));
395
+ file_put_contents(
396
+ $file,
397
+ $dumper->dump(array('class' => 'MyCachedContainer'))
398
+ );
384
399
}
385
400
}
386
401
0 commit comments