|
пре 13 година | |
---|---|---|
.. | ||
Compiler | пре 13 година | |
Dumper | пре 13 година | |
Exception | пре 14 година | |
Extension | пре 14 година | |
Loader | пре 13 година | |
ParameterBag | пре 13 година | |
Alias.php | пре 14 година | |
Container.php | пре 13 година | |
ContainerAware.php | пре 14 година | |
ContainerAwareInterface.php | пре 14 година | |
ContainerBuilder.php | пре 13 година | |
ContainerInterface.php | пре 13 година | |
Definition.php | пре 13 година | |
DefinitionDecorator.php | пре 13 година | |
LICENSE | пре 13 година | |
Parameter.php | пре 14 година | |
README.md | пре 13 година | |
Reference.php | пре 13 година | |
Scope.php | пре 14 година | |
ScopeInterface.php | пре 14 година | |
SimpleXMLElement.php | пре 13 година | |
TaggedContainerInterface.php | пре 14 година | |
Variable.php | пре 14 година | |
composer.json | пре 13 година |
DependencyInjection manages your services via a robust and flexible Dependency Injection Container.
Here is a simple example that shows how to register services and parameters:
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
$sc = new ContainerBuilder();
$sc
->register('foo', '%foo.class%')
->addArgument(new Reference('bar'))
;
$sc->setParameter('foo.class', 'Foo');
$sc->get('foo');
Unit tests:
https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/DependencyInjection