-
-
Save igorw/1049102 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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