thecodingmachine/pimple-universal-service-provider-bridge

This library allows Pimple containers to use universal service providers as defined in container-interop/service-provider

1.0.x-dev 2016-10-25 20:57 UTC

This package is auto-updated.

Last update: 2024-11-07 00:43:10 UTC


README

Latest Stable Version Latest Unstable Version License Scrutinizer Code Quality Build Status Coverage Status

container-interop/service-provider bridge for Pimple

Register service-providers as defined in container-interop into a Pimple 3 container.

Installation

Add the package in composer:

composer require thecodingmachine/pimple-universal-service-provider-bridge ^1.0

Usage

Create a ServiceProviderPimpleBridge instance and register container-interop service providers on this instance.

use TheCodingMachine\Pimple\ServiceProviderPimpleBridge;

// Create your pimple container
$pimple = new Pimple\Container();

// Create the bridge
$bridge = new ServiceProviderPimpleBridge($pimple);

// Now, register any service provider you like (compatible with container-interop/service-provider) on the bridge
$bridge->register(new GlideServiceProvider());