Hacked By AnonymousFox

Current Path : /proc/thread-self/root/proc/self/root/opt/alt/php53/usr/share/pear/test/DependencyInjection/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/opt/alt/php53/usr/share/pear/test/DependencyInjection/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/interfaces2.php

<?php

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

$container = new ContainerBuilder();

$factoryDefinition = new Definition('BarClassFactory');
$container->setDefinition('barFactory', $factoryDefinition);

$definition = new Definition();
$definition->setFactoryService('barFactory');
$definition->setFactoryMethod('createBarClass');
$container->setDefinition('bar', $definition);

return $container;

class BarClass
{
    public $foo;

    public function setBar($foo)
    {
        $this->foo = $foo;
    }
}

class BarClassFactory
{
    public function createBarClass()
    {
        return new BarClass();
    }
}

Hacked By AnonymousFox1.0, Coded By AnonymousFox