2017 © Pedro Peláez
 

library di

Dependency injection container.

image

php-lab/di

Dependency injection container.

  • Monday, March 7, 2016
  • by davletshin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 131 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Dependency injection container

Build Status Scrutinizer Code Quality Total Downloads License, (*1)

PhpLab\Di requires PHP 7., (*2)

Usage

use PhpLab\Di\Container;

$app = new Container();

$app->pageIndexAction = function (Container $di) {
    return new \Page\Action\IndexAction($di->pageIndexResponder);
};
$app->pageIndexResponder = function (Container $di) {
    return new \Page\Responder\IndexResponder($di->pageIndexTemplate);
};
$app->pageIndexTemplate = function (Container $di) {
    return new \Page\Template\IndexTemplate($di['path.template']);
};

$app['path.root'] = __DIR__ . '/../..';
$app['path.template'] = $app['path.root'] . '/template/site';

License

PhpLab\Di is licensed under the MIT license., (*3)

The Versions

07/03 2016

dev-master

9999999-dev

Dependency injection container.

  Sources   Download

MIT

The Requires

  • php >=7.0

 

by Yuriy Davletshin

service container ioc dependency di injection