<?php use Symfony\Component\DependencyInjection\ContainerBuilder; $container = new ContainerBuilder(); $container ->register('foo', 'Foo') ->setAutowired(true) ->addAutowiringType('A') ->addAutowiringType('B') ; return $container;
info at phpclasses dot org