This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/DependencyInjection
2012-01-06 21:20:08 +01:00
..
Compiler fixed CS 2011-12-18 14:42:59 +01:00
Dumper [DependencyInjection] PhpDumper, fixes #2730 2012-01-06 21:20:08 +01:00
Exception Removed executable bits from all php files 2011-09-09 15:16:17 +02:00
Extension [DependencyInjection] tagged the public @api 2011-07-20 10:50:27 +02:00
Loader fixed CS 2011-12-18 14:42:59 +01:00
ParameterBag ParameterBag no longer resolves parameters that have spaces. 2011-12-27 12:49:22 -08:00
Alias.php [DependencyInjection] tagged the public @api 2011-07-20 10:50:27 +02:00
composer.json removed the version attribute in all composer.json files 2012-01-05 14:51:20 +01:00
Container.php [DoctrineBridge] fixed some CS 2011-12-13 10:22:12 +01:00
ContainerAware.php [DependencyInjection] tagged the public @api 2011-07-20 10:50:27 +02:00
ContainerAwareInterface.php [DependencyInjection] tagged the public @api 2011-07-20 10:50:27 +02:00
ContainerBuilder.php fixed CS 2011-12-18 14:42:59 +01:00
ContainerInterface.php [DoctrineBridge] fixed some CS 2011-12-13 10:22:12 +01:00
Definition.php [DoctrineBridge] fixed some CS 2011-12-13 10:22:12 +01:00
DefinitionDecorator.php [DependencyInjection] Fix DefinitionDecorator::getArgument() for replacements 2011-10-27 18:03:51 -04:00
LICENSE added LICENSE files for the subtree repositories 2011-02-22 18:58:15 +01:00
Parameter.php [DependencyInjection] tagged the public @api 2011-07-20 10:50:27 +02:00
README.md tweaked the README files 2011-12-18 14:22:28 +01:00
Reference.php [DependencyInjection] Made the reference case insensitive 2011-12-08 16:30:50 +01:00
Scope.php [DependencyInjection] tagged the public @api 2011-07-20 10:50:27 +02:00
ScopeInterface.php [DependencyInjection] tagged the public @api 2011-07-20 10:50:27 +02:00
SimpleXMLElement.php [DoctrineBridge] fixed some CS 2011-12-13 10:22:12 +01:00
TaggedContainerInterface.php [DependencyInjection] tagged the public @api 2011-07-20 10:50:27 +02:00
Variable.php fixed CS 2011-06-08 12:16:48 +02:00

DependencyInjection Component

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');

Resources

Unit tests:

https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/DependencyInjection