geggleto / slim-pimple-bridge
Slim Pimple Bridge. Inject's slim's dependencies into a Pimple Container
Installs: 944
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
pkg:composer/geggleto/slim-pimple-bridge
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: 2025-09-29 01:47:17 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);