private function ResolveParameterPlaceHoldersPassTest::createContainerBuilder in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/dependency-injection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\ResolveParameterPlaceHoldersPassTest::createContainerBuilder()
1 call to ResolveParameterPlaceHoldersPassTest::createContainerBuilder()
- ResolveParameterPlaceHoldersPassTest::setUp in vendor/
symfony/ dependency-injection/ Tests/ Compiler/ ResolveParameterPlaceHoldersPassTest.php
File
- vendor/
symfony/ dependency-injection/ Tests/ Compiler/ ResolveParameterPlaceHoldersPassTest.php, line 66
Class
Namespace
Symfony\Component\DependencyInjection\Tests\CompilerCode
private function createContainerBuilder() {
$containerBuilder = new ContainerBuilder();
$containerBuilder
->setParameter('foo.class', 'Foo');
$containerBuilder
->setParameter('foo.factory.class', 'FooFactory');
$containerBuilder
->setParameter('foo.arg1', 'bar');
$containerBuilder
->setParameter('foo.arg2', 'baz');
$containerBuilder
->setParameter('foo.method', 'foobar');
$containerBuilder
->setParameter('foo.property.name', 'bar');
$containerBuilder
->setParameter('foo.property.value', 'baz');
$containerBuilder
->setParameter('foo.file', 'foo.php');
$containerBuilder
->setParameter('alias.id', 'bar');
$fooDefinition = $containerBuilder
->register('foo', '%foo.class%');
$fooDefinition
->setFactory(array(
'%foo.factory.class%',
'getFoo',
));
$fooDefinition
->setArguments(array(
'%foo.arg1%',
'%foo.arg2%',
));
$fooDefinition
->addMethodCall('%foo.method%', array(
'%foo.arg1%',
'%foo.arg2%',
));
$fooDefinition
->setProperty('%foo.property.name%', '%foo.property.value%');
$fooDefinition
->setFile('%foo.file%');
$containerBuilder
->setAlias('%alias.id%', 'foo');
return $containerBuilder;
}