PHP code example of accolon / container
1. Go to this page and download the library: Download accolon/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/ */
accolon / container example snippets
use Accolon\Container\Container;
s = new stdClass();
$stdClass->name = "George";
$container->singletons("class", $stdClass);
$container->bind("class2", \stdClass::class);
$container->get('class')->name = "George2";
var_dump($container->get('class'));
var_dump($container->get('class2'));