Skip to content

Amazing and easy to follow PHP dependency injection container package. Made with PSR-2 and PSR-4.

License

Notifications You must be signed in to change notification settings

martiadrogue/container

Repository files navigation

container

Latest Version on Packagist Software License Coverage Status Quality Score Total Downloads

Amazing, easy to follow PHP dependency injection container package. Made with PSR-2 and PSR-4.

Install

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

Usage

$parameters = [
    'first' => [
        'second' => 'foo',
        'third' => [
            'fourth' => 'bar',
        ],
    ],
];
$container = new MartiAdrogue\Container([], parameters);
echo $container->getParameter('first.third.fourth');

Testing

$ composer test

Code Smell Fix

composer format run php-cs-fixer and phpcbf to fix up the PHP code to follow the coding standards.

composer format

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email marti.adrogue@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Amazing and easy to follow PHP dependency injection container package. Made with PSR-2 and PSR-4.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages