From e030bf6e38190edcfbb9090c3ca51304e113b62b Mon Sep 17 00:00:00 2001 From: Abdouni Abdelkarim Date: Wed, 12 Feb 2020 23:46:38 +0100 Subject: [PATCH] Update advanced.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hello, I just updated the class name 😉 --- doc/advanced.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/advanced.rst b/doc/advanced.rst index 2b0053b6e..de3e8d6e1 100644 --- a/doc/advanced.rst +++ b/doc/advanced.rst @@ -189,7 +189,7 @@ If you want to access the current environment instance in your filter, set the ``needs_environment`` option to ``true``; Twig will pass the current environment as the first argument to the filter call:: - $filter = new \Twig\TwigFilter('rot13', function (Twig_Environment $env, $string) { + $filter = new \Twig\TwigFilter('rot13', function (\Twig\Environment $env, $string) { // get the current charset for instance $charset = $env->getCharset(); @@ -208,7 +208,7 @@ the first argument to the filter call (or the second one if // ... }, ['needs_context' => true]); - $filter = new \Twig\TwigFilter('rot13', function (Twig_Environment $env, $context, $string) { + $filter = new \Twig\TwigFilter('rot13', function (\Twig\Environment $env, $context, $string) { // ... }, ['needs_context' => true, 'needs_environment' => true]);