From: Mark Story Date: Sat, 24 Jul 2010 03:38:26 +0000 (-0400) Subject: Updating documentation for addExtension() X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=df0651b9af96cef22e27df0f6c6fc4b38e3068eb;p=konrad%2Ftwig.git Updating documentation for addExtension() --- diff --git a/doc/03-Twig-for-Developers.markdown b/doc/03-Twig-for-Developers.markdown index 9b75b70..e73bc63 100644 --- a/doc/03-Twig-for-Developers.markdown +++ b/doc/03-Twig-for-Developers.markdown @@ -226,20 +226,20 @@ Twig extensions are packages that adds new features to Twig. Using an extension is as simple as using the `addExtension()` method: [php] - $twig->addExtension('Escaper'); + $twig->addExtension(new Twig_Extension_Escaper()); Twig comes bundled with four extensions: - * *Core*: Defines all the core features of Twig and is automatically + * *Twig_Extension_Core*: Defines all the core features of Twig and is automatically registered when you create a new environment. - * *Escaper*: Adds automatic output-escaping and the possibility to + * *Twig_Extension_Escaper*: Adds automatic output-escaping and the possibility to escape/unescape blocks of code. - * *Sandbox*: Adds a sandbox mode to the default Twig environment, making it + * *Twig_Extension_Sandbox*: Adds a sandbox mode to the default Twig environment, making it safe to evaluated untrusted code. - * *I18n*: Adds internationalization support via the gettext library. + * *Twig_Extension_I18n*: Adds internationalization support via the gettext library. Built-in Extensions -------------------