PHP code example of antidot-fw / container

1. Go to this page and download the library: Download antidot-fw/container 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/ */

    

antidot-fw / container example snippets




declare(strict_types=1);

use Antidot\Container\Builder;

$container = Builder::build([
    'config' => [],
    'parameters' => [],
    'services' => [
        'some.service' => Some::class,
    ],
], true);
if ($container->has('some.service')) {
    $service = $container->get('some.service');
}