PHP Classes

File: vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container20.php

Recommend this page to a friend!
  Classes of Murat Cileli   Papernic   vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container20.php   Download  
File: vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container20.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Papernic
Manage documents colaboratively
Author: By
Last change:
Date: 7 years ago
Size: 551 bytes
 

Contents

Class file image Download
<?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;