2017 © Pedro Peláez
 

library jest

A simple Dependency Injector for PHP 5.4+

image

jest/jest

A simple Dependency Injector for PHP 5.4+

  • Thursday, January 30, 2014
  • by jeffturcotte
  • Repository
  • 1 Watchers
  • 1 Stars
  • 25 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Jest

A simple dependency injection library, (*1)

Build Status, (*2)

Jest looks to find the middle ground between the simplicity offered by tiny service locators like Pimple and the real dependency injection libraries like PHP-DI provide., (*3)

Jest uses an API very similar to Pimple and uses type casting and reflection to determine which dependencies need to be injected into the specified class or PHP callable (Closure, function, or method)., (*4)

Usage:

```(php) $injector = new Jest\Injector();, (*5)

// configure your shared dependencies, (*6)

$injector['Request'] = function() { return new Request(); };, (*7)

$injector['Session'] = function(Request $req) { return new Session($req); };, (*8)

// invoke a callable with the dependencies, (*9)

$returnValue = $injector->invoke(function(Request $req, Session $sess) { return array($req, $sess); });, (*10)

The Versions

30/01 2014

dev-master

9999999-dev https://github.com/jeffturcotte/jest

A simple Dependency Injector for PHP 5.4+

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Jeff Turcotte

dependency injection di

30/01 2014

v1.0.0

1.0.0.0 https://github.com/jeffturcotte/jest

A simple Dependency Injector for PHP 5.4+

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Jeff Turcotte

dependency injection di