2017 © Pedro Peláez
 

library pimple-interop

Pimple bridge for PSR-11 ContainerInterface

image

gromnan/pimple-interop

Pimple bridge for PSR-11 ContainerInterface

  • Saturday, December 23, 2017
  • by GromNaN
  • Repository
  • 1 Watchers
  • 5 Stars
  • 1,631 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 28 % Grown

The README.md

Pimple bridge for PSR-11 Container

This package is deprecated since support of PSR-11 added to Pimple, (*1)

PSR-11 is a standardised interface to access services defined in dependency injection containers., (*2)

Pimple is the kind of library that should implement this interface. But it can't because Silex, the micro-framework on top of Pimple, declares a method Silex\Application::get that conflicts with Psr\Container\ContainerInterface::get, (*3)

Usage

Using Pimple, register the PimpleContaineProvider and create a new service that exposes Pimple' services through the Psr\Container\ContainerInterface:, (*4)

$pimple = new Container\Pimple()
$pimple->register(new GromNaN\Pimple\PimpleContainerProvider());

// Access the services
$pimple['container']->has('my.service');
$pimple['container']->get('my.service');

The service $pimple['container'] can be injected into any service that require a Standard Container implementation., (*5)

The Versions

23/12 2017

dev-master

9999999-dev

Pimple bridge for PSR-11 ContainerInterface

  Sources   Download

MIT

The Requires

 

by Jérôme Tamarelle

23/03 2017

v1.0.0

1.0.0.0

Pimple bridge for PSR-11 ContainerInterface

  Sources   Download

MIT

The Requires

 

by Jérôme Tamarelle