accolon / container
Container
2.0.0
2021-07-22 00:23 UTC
Requires
- php: ^8.0
- psr/container: ^1.0
Requires (Dev)
- pestphp/pest: ^1.8
README
Use get for objects and get for rest.
<?php use Accolon\Container\Container; require_once './vendor/autoload.php'; $container = new Container(); $stdClass = 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'));