Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geggleto/slim-pimple-bridge
https://github.com/geggleto/slim-pimple-bridge
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/geggleto/slim-pimple-bridge
- Owner: geggleto
- License: mit
- Created: 2015-12-01T18:04:15.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-03T20:38:39.000Z (almost 9 years ago)
- Last Synced: 2024-04-18T17:17:10.276Z (7 months ago)
- Language: PHP
- Size: 10.7 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Slim-Pimple Bridge
The Slim-Pimple Bridge allows you to "bring your own"
[Pimple](http://pimple.sensiolabs.org/) 3.x container to a
[Slim](http://www.slimframework.com/) 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.``` php
// 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);
```