Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

README.md

hirak/kibi

Auto Dependency Injection Container

Requirements

  • PHP >= 7
  • composer >= 1.2

Example

<?php
require 'vendor/autoload.php';
$container = new Hirak\Kibi\Instantiator;
$container->addTrait(Acme\Provider::class);

/** @var Acme\Dispatcher */
$dispatcher = $container->get(Acme\Dispatcher::class);
$dispatcher->run($_SERVER, $_REQUEST);
<?php
namespace Acme;

trait Provider
{
    public function now(): DateTimeImmutable
    {
        return new DateTimeImmutable;
    }
}

About

(WIP)DI Container

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.