container_inline_requires.php 780 B

12345678910111213141516171819
  1. <?php
  2. namespace Symfony\Tests\InlineRequires;
  3. use Symfony\Component\DependencyInjection\ContainerBuilder;
  4. use Symfony\Component\DependencyInjection\Definition;
  5. use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
  6. use Symfony\Component\DependencyInjection\Reference;
  7. use Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath;
  8. use Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists;
  9. $container = new ContainerBuilder();
  10. $container->register(HotPath\C1::class)->addTag('container.hot_path')->setPublic(true);
  11. $container->register(HotPath\C2::class)->addArgument(new Reference(HotPath\C3::class))->setPublic(true);
  12. $container->register(HotPath\C3::class);
  13. $container->register(ParentNotExists::class)->setPublic(true);
  14. return $container;