Skip to content

geggleto/slim-pimple-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slim-Pimple Bridge

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);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages