geggleto / slim-pimple-bridge
Slim Pimple Bridge. Inject's slim's dependencies into a Pimple Container
0.1.1
2015-12-03 13:01 UTC
Requires
- php: >=5.5.0
- pimple/pimple: ^3.0
- slim/slim: ^3.0
Requires (Dev)
- phpunit/phpunit: ^5.0
This package is auto-updated.
Last update: 2024-10-29 04:58:48 UTC
README
The Slim-Pimple Bridge allows you to "bring your own" Pimple 3.x container to a Slim 3.x application without requiring you to refactor your existing container.
Installation
composer require geggleto/slim-pimple-bridge
Usage
The example below assumes that your Pimple\Container
instance is assigned to the
$myAwesomePimpleContainer
variable.
// Here's a default \Slim\Container. $slimContainer = new \Slim\Container(); // Use SlimPimpleBridge::merge() to add all of the services from your container // to the $slimContainer instance. $container = SlimPimpleBridge::merge( $slimContainer, $myAwesomePimpleContainer ); // Done! It's that easy! $app = new \Slim\App($container);