-
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 |
---|---|---|
.. | ||
Symfony/Component | ||
pimple @ 0f20b9db |