1. Go to this page and download the library: Download sysvyz/brunt 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/ */
$injector = new Injector(null);
// TOKEN PROVIDER CLASS LAZY
$injector->addProviders([Engine::class => ClassProvider::init(HeavyEngine::class)->lazy()]);
/** @var Engine $engine */
$engine = $injector->get(Engine::class); //returns a proxy object
$injector = new Injector(null);
$injector->bind([
bind(Car::class)
->toClass(Car::class)->lazy(),
]);
$car = $injector->get(Car::class) //returns a proxy object
$car->honk() //creates the actual car and honks