bigbit/di-bootstrap

App DI Container bootstrapping

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

This package is auto-updated.

Last update: 2024-10-29 06:05:39 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();