|
|
пре 14 година | |
|---|---|---|
| .. | ||
| Compiler | пре 14 година | |
| Dumper | пре 14 година | |
| Exception | пре 14 година | |
| Extension | пре 14 година | |
| Loader | пре 14 година | |
| ParameterBag | пре 14 година | |
| Alias.php | пре 14 година | |
| Container.php | пре 14 година | |
| ContainerAware.php | пре 14 година | |
| ContainerAwareInterface.php | пре 14 година | |
| ContainerBuilder.php | пре 14 година | |
| ContainerInterface.php | пре 14 година | |
| Definition.php | пре 14 година | |
| DefinitionDecorator.php | пре 14 година | |
| Parameter.php | пре 14 година | |
| README.md | пре 14 година | |
| Reference.php | пре 14 година | |
| Scope.php | пре 14 година | |
| ScopeInterface.php | пре 14 година | |
| SimpleXMLElement.php | пре 14 година | |
| TaggedContainerInterface.php | пре 14 година | |
| Variable.php | пре 14 година | |
| composer.json | пре 14 година | |
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