This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container20.php

20 lines
551 B
PHP

<?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;