PHP Classes

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

Recommend this page to a friend!
  Classes of Murat Cileli   Papernic   vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container21.php   Download  
File: vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container21.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: 546 bytes
 

Contents

Class file image Download
<?php

use Symfony\Component\DependencyInjection\ContainerBuilder;
use
Symfony\Component\DependencyInjection\Definition;

$container = new ContainerBuilder();

$bar = new Definition('Bar');
$bar->setConfigurator(array(new Definition('Baz'), 'configureBar'));

$fooFactory = new Definition('FooFactory');
$fooFactory->setFactory(array(new Definition('Foobar'), 'createFooFactory'));

$container
   
->register('foo', 'Foo')
    ->
setFactory(array($fooFactory, 'createFoo'))
    ->
setConfigurator(array($bar, 'configureFoo'))
;

return
$container;