Version 1
[yaffs-website] / vendor / symfony / dependency-injection / Tests / Fixtures / containers / container20.php
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container20.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container20.php
new file mode 100644 (file)
index 0000000..a40a0e8
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+
+require_once __DIR__.'/../includes/classes.php';
+
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Reference;
+
+$container = new ContainerBuilder();
+$container
+    ->register('request', 'Request')
+    ->setSynchronized(true)
+;
+$container
+    ->register('depends_on_request', 'stdClass')
+    ->addMethodCall('setRequest', array(new Reference('request', ContainerInterface::NULL_ON_INVALID_REFERENCE, false)))
+;
+
+return $container;