container21.php in Service Container 7
Same filename and directory in other branches
File
modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container21.phpView source
<?php
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
$container = new ContainerBuilder();
$bar = new Definition('Bar');
$bar
->setConfigurator(array(
new Definition('Baz'),
'configureBar',
));
$fooFactory = new Definition('FooFactory');
$fooFactory
->setFactory(array(
new Definition('Foobar'),
'createFooFactory',
));
$container
->register('foo', 'Foo')
->setFactory(array(
$fooFactory,
'createFoo',
))
->setConfigurator(array(
$bar,
'configureFoo',
));
return $container;