Skip to content

Instantly share code, notes, and snippets.

@igorw
Forked from till/bootstrap.php
Created June 27, 2011 15:32
Show Gist options
  • Save igorw/1049102 to your computer and use it in GitHub Desktop.
Save igorw/1049102 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\ArraySessionStorage();
});
var_dump($app['session']); exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment