asfallows
0
Q:

conteneur d'injection de dépendance php

// short example of what DIC does
class Foo
{
    public function __construct(Bar $bar)
    {
    }
}

$foo = $container->get('Foo');
// Which is equivalent to the following
$bar = new Bar;
$foo = new Foo($bar);
0
class Foo
{
    public function __construct(Bar $bar)
    {
    }
}

$foo = $container->get('Foo');
// qui est équivalent à ce qui suit
$bar = new Bar;
$foo = new Foo($bar);
0

New to Communities?

Join the community