$container->
setParameter('foo.property.name', 'bar'
);
$container->
setParameter('foo.property.value', 'baz'
);
$container->
setParameter('foo.file', 'foo.php'
);
$container->
setParameter('alias.id', 'bar'
);
$fooDefinition =
$container->
register('foo', '%foo.class%'
);
$fooDefinition->
setFactory(['%foo.factory.class%', 'getFoo'
]);
$fooDefinition->
setArguments(['%foo.arg1%',
['%foo.arg1%' => 'baz'
]]);
$fooDefinition->
addMethodCall('%foo.method%',
['%foo.arg1%', '%foo.arg2%'
]);
$fooDefinition->
setProperty('%foo.property.name%', '%foo.property.value%'
);
$fooDefinition->
setFile('%foo.file%'
);
$fooDefinition->
setBindings(['$baz' => '%env(BAZ)%'
]);
$container->
setAlias('%alias.id%', 'foo'
);
return $container;
}}