PHP code example of bigbit / di-bootstrap
1. Go to this page and download the library: Download bigbit/di-bootstrap library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bigbit / di-bootstrap example snippets
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();