Commit 5ca81b04 authored by Fabien Potencier's avatar Fabien Potencier

fixed doc

parent d89cbcd9
......@@ -12,11 +12,11 @@ Changelog
After::
$app['twig'] = $app->extend('twig', function($twig, $app) {
$app['twig'] = $app->share($app->extend('twig', function($twig, $app) {
// do something
return $twig;
});
}));
* **2012-06-13**: Added a route ``before`` middleware
......
......@@ -126,12 +126,12 @@ Customization
You can configure the Twig environment before using it by extending the
``twig`` service::
$app['twig'] = $app->extend('twig', function($twig, $app) {
$app['twig'] = $app->share($app->extend('twig', function($twig, $app) {
$twig->addGlobal('pi', 3.14);
$twig->addFilter('levenshtein', new \Twig_Filter_Function('levenshtein'));
return $twig;
});
}));
For more information, check out the `Twig documentation
<http://twig.sensiolabs.org>`_.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment