Created
June 27, 2011 15:23
-
-
Save till/1049085 to your computer and use it in GitHub Desktop.
This file contains hidden or 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'; | |
require_once 'phar://' . __DIR__ . '/silex.phar/vendor/Symfony/Component/ClassLoader/UniversalClassLoader.php'; | |
use Symfony\Component\ClassLoader\UniversalClassLoader; | |
$loader = new UniversalClassLoader(); | |
$loader->register(); | |
/** | |
* @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'] = new Symfony\Component\HttpFoundation\SessionStorage(); | |
// class not found error | |
var_dump($app['session']); exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment