Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / dependency-injection / Tests / Fixtures / containers / container_env_in_id.php
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_env_in_id.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_env_in_id.php
new file mode 100644 (file)
index 0000000..4699f41
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
+use Symfony\Component\DependencyInjection\Reference;
+
+$container = new ContainerBuilder();
+
+$container->setParameter('env(BAR)', 'bar');
+
+$container->register('foo', 'stdClass')->setPublic(true)
+   ->addArgument(new Reference('bar_%env(BAR)%'))
+   ->addArgument(array('baz_%env(BAR)%' => new Reference('baz_%env(BAR)%')));
+
+$container->register('bar', 'stdClass')->setPublic(true)
+   ->addArgument(new Reference('bar_%env(BAR)%'));
+
+$container->register('bar_%env(BAR)%', 'stdClass')->setPublic(false);
+$container->register('baz_%env(BAR)%', 'stdClass')->setPublic(false);
+
+return $container;