2017 © Pedro Peláez
 

library containerkit

image

donquixote/containerkit

  • Monday, January 11, 2016
  • by donquixote
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 7 % Grown

The README.md

Build Status, (*1)

containerkit

A very minimal base class for a PHP dependency injection container with magic __get(), as described in http://dqxtech.net/blog/2014-06-13/simple-do-it-yourself-php-service-container, (*2)

Nothing in here is auto-generated. The methods that instantiate services need to be written manually in a class extending the parent container., (*3)

Providing an alternative implementation for a service only works by extending the container., (*4)

It is recommended to add @property tags in the class docblock of your container class., (*5)

ContainerBase

This is the most basic container base class. Usually you only need this one., (*6)

SettableContainer

This one has a __set() method in addition to the __get() method. Setting only works for services / values that are not already initialized., (*7)

The __set() allows to override specific services with actual objects, thus providing a cheap alternative to extending the container., (*8)

Stubbable container

This container is designed for a special way to deal with circular dependencies, using stubs., (*9)

Usually this is not needed. You should either avoid circular dependencies (recommended, if you can), or use a proxy somewhere in the circle., (*10)

The Versions

11/01 2016

dev-master

9999999-dev

  Sources   Download

MIT

by Andreas Hennings

11/01 2016

0.0.0-alpha.1

0.0.0.0-alpha1

  Sources   Download

MIT

by Andreas Hennings

11/01 2016

0.0.0-alpha

0.0.0.0-alpha

  Sources   Download

MIT

by Andreas Hennings