bigbit/di-bootstrap

App DI Container bootstrapping

v2.0.1 2020-04-01 12:18 UTC

This package is auto-updated.

Last update: 2023-01-29 03:28:19 UTC


README

App DI Container bootstrapping with dependencies for PHP7.4

Example

use BigBIT\DIBootstrap\Bootstrap;

Bootstrap::useVendorPath(dirname(__DIR__) . DIRECTORY_SEPARATOR . "vendor");
Bootstrap::useContainerImplementation(BigBIT\SmartDI\SmartContainer::class);

$bindings = [
    SomeInterface::class => function(ContainerInterface $container) {
        return new SomeImplementation($container); 
    }
];

$container = Bootstrap::getContainer();

$app = new App($container);

$app->run();