-
Fabien Potencier authored
You can now use the app instance to store objects or parameters: $app = new Application(); $app['twig'] = new \Twig_Environment(...); $app['debug'] = true; $app->get('/', function() use ($app) { return $app['twig']->load('index.html')->render(array()); }); For sercices, you can even make them lazy loaded and/or shared: $app['twig'] = $app->asShared(function () { return \Twig_Environment(...); });
8a7b4321
Name |
Last commit
|
Last update |
---|---|---|
src/Silex | ||
tests | ||
vendor | ||
.gitignore | ||
.gitmodules | ||
LICENSE | ||
README.md | ||
autoload.php | ||
compile.php | ||
example.htaccess | ||
phpunit.xml.dist |