Amazing, easy to follow PHP dependency injection container package. Made with PSR-2 and PSR-4.
Via Composer, update your composer.json to use martiadrogue/container
"repositories": [
{
"type": "git",
"url": "https://github.com/martiadrogue/container.git"
}
],
Then you must add martiadrogue/container in require.
"require": {
"martiadrogue/container": "dev-devel"
},
Or invoke
composer require martiadrogue/container:@dev
Old school, forget all and grab files from this directory
$parameters = [
'first' => [
'second' => 'foo',
'third' => [
'fourth' => 'bar',
],
],
];
$container = new MartiAdrogue\Container([], parameters);
echo $container->getParameter('first.third.fourth');
$ composer test
composer format
run php-cs-fixer and phpcbf to fix up the PHP code to follow
the coding standards.
composer format
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email marti.adrogue@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.