2017 © Pedro Peláez
 

library little

Laughably simple IoC container

image

ilya/little

Laughably simple IoC container

  • Tuesday, May 27, 2014
  • by ilya.s
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

Little is a very small IoC container written in PHP just for fun. This project is heavily inspired by the Laravel IoC container., (*2)

Little supports automatic dependency resolution, singletons and binding existing instances into the container., (*3)

Little consists of ~200 lines of code (including comments) and 5 methods available to you:, (*4)

  • void bind(string $abstract, string|Closure $concrete)
  • mixed make(string $abstract)
  • void singleton(string $abstract, string|Closure $concrete)
  • void instance(string $abstract, mixed $instance)
  • Closure share(Closure $closure)
  • boolean bound(string $abstract)

Believe it or not, that's it!, (*5)

Installation

composer require "ilya/little:~1"

Examples

Check out the examples folder. To run the demo, type:, (*6)

php examples/demo.php

License

The MIT license, check out the LICENSE file., (*7)

P.S. follow the author on Twitter, (*8)

The Versions

27/05 2014

dev-master

9999999-dev

Laughably simple IoC container

  Sources   Download

MIT

The Development Requires

by Ilya S

27/05 2014

1.0.1

1.0.1.0

Laughably simple IoC container

  Sources   Download

MIT

The Development Requires

by Ilya S

31/03 2014

1.0

1.0.0.0

Laughably simple IoC container

  Sources   Download

MIT

The Development Requires

by Ilya S

29/03 2014

0.9

0.9.0.0

Laughably simple IoC container

  Sources   Download

MIT

The Development Requires

by Ilya S