Skip to content

Instantly share code, notes, and snippets.

@CarsonF
Created Jul 17, 2015
Embed
What would you like to do?
Dumps pimple container for silex plugin
<?php
use Sorien\Provider\PimpleDumpProvider;
use Symfony\Component\HttpFoundation\Request;
require_once __DIR__ . '/vendor/autoload.php';
$app = new \Bolt\Application();
$request = Request::create('/');
Request::setFactory(function () use ($request) {
return $request;
});
$app->initialize();
$app->register(new PimpleDumpProvider());
$response = $app->handle($request);
$app->terminate($request, $response);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment