Wednesday, September 20, 2017

Lethaba DI Container

In my last post I wrote up some notes about reading the Pimple 1.x source.
At the end of it I mentioned I wanted to write a DI container myself.

Behold, Lethaba DI - a stupidly simple clone of Pimple.

A couple things - I decided against implementing the ArrayAccess interface and followed Laravel in making the container callable, so in order to grab something out of the container instead of this

$container['service'];

we go

$container('service');

But beyond that ... it's pretty much a clone.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.