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
Fabien Potencier a10fee16c1 merged branch igorw/dic-yaml-without-args (PR #3747)
Commits
-------

24a0d0a [DependencyInjection] Support Yaml calls without arguments

Discussion
----------

[DependencyInjection] Support Yaml calls without arguments
2012-04-01 10:27:21 +02: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 merged branch igorw/dic-yaml-without-args (PR #3747) 2012-04-01 10:27:21 +02:00
ParameterBag [DependencyInjection] Allow parsing of parameters near escaped percent signs 2012-03-06 13:33:50 +01: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 Updated LICENSE files copyright 2012-02-22 10:10:37 +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