Skip to content

Instantly share code, notes, and snippets.

@till
Forked from igorw/bootstrap.php
Created June 27, 2011 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save till/1049108 to your computer and use it in GitHub Desktop.
Save till/1049108 to your computer and use it in GitHub Desktop.
<?php
require_once __DIR__ . '/silex.phar';
/**
* @desc Add local pear setup.
*/
set_include_path(__DIR__ . '/vendor/pear:' . get_include_path());
$app = new Silex\Application();
// register twig for views
$app->register(new Silex\Extension\TwigExtension(), array(
'twig.path' => __DIR__ . '/views',
'twig.class_path' => __DIR__ . '/vendor/fabpot-Twig-612fa7b/lib/',
));
// load session extensions
$app->register(new Silex\Extension\SessionExtension());
$app['session.storage'] = $app->share(function ($app) {
return new Symfony\Component\HttpFoundation\SessionStorage\ArraySessionStorage();
});
var_dump($app['session']); exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment