Skip to content

hirak/kibi

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

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

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages