PHP code example of biurad / dependency-injection

1. Go to this page and download the library: Download biurad/dependency-injection 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/ */

    

biurad / dependency-injection example snippets


use Psr\Container\ContainerInterface;

class HomeContoller
{
    public function index(ContainerInterface $container)
    {
        var_dump($container->get(App\Kernel::class));
    }
}