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
2013-01-05 10:03:43 +01:00
..
Compiler Fixed the phpdoc in the DependencyInjection component 2012-09-08 00:56:45 +02:00
Dumper [DependencyInjection] fixed PhpDumper when an inlined service definition has some properties 2013-01-05 10:03:43 +01:00
Exception Removed executable bits from all php files 2011-09-09 15:16:17 +02:00
Extension fixed CS (mainly method signatures) 2012-07-09 14:43:50 +02:00
Loader Fixed the phpdoc in the DependencyInjection component 2012-09-08 00:56:45 +02:00
ParameterBag Fixed the phpdoc in the DependencyInjection component 2012-09-08 00:56:45 +02:00
Alias.php fixed phpdoc @param alignment 2012-05-15 18:56:32 +02:00
composer.json [DependencyInjection] fixed composer.json 2012-11-27 09:54:37 +01:00
Container.php Fixed the phpdoc in the DependencyInjection component 2012-09-08 00:56:45 +02:00
ContainerAware.php [DependencyInjection] tagged the public @api 2011-07-20 10:50:27 +02:00
ContainerAwareInterface.php fixed CS (mainly method signatures) 2012-07-09 14:43:50 +02:00
ContainerBuilder.php Fixed the phpdoc in the DependencyInjection component 2012-09-08 00:56:45 +02:00
ContainerInterface.php Fixed the phpdoc in the DependencyInjection component 2012-09-08 00:56:45 +02:00
Definition.php Fixed the phpdoc in the DependencyInjection component 2012-09-08 00:56:45 +02:00
DefinitionDecorator.php Fixed the phpdoc in the DependencyInjection component 2012-09-08 00:56:45 +02:00
LICENSE updated license year 2013-01-04 17:59:43 +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 fixed CS (mainly method signatures) 2012-07-09 14:43:50 +02:00
SimpleXMLElement.php fixed CS (mainly method signatures) 2012-07-09 14:43:50 +02:00
TaggedContainerInterface.php fixed CS (mainly method signatures) 2012-07-09 14:43:50 +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