From: Fabien Potencier Date: Wed, 12 Jan 2011 09:39:35 +0000 (+0100) Subject: fixed documentation for the sandbox security policy X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=c20116ee8da5ae55201e431cefdf1e20bfd4aa30;p=web%2Fkonrad%2Ftwig.git fixed documentation for the sandbox security policy --- diff --git a/doc/api.rst b/doc/api.rst index 2dcfb5a..a9dfd83 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -414,7 +414,8 @@ tags, filters, properties, and methods:: $properties = array( 'Article' => array('title', 'body'), ); - $policy = new Twig_Sandbox_SecurityPolicy($tags, $filters, $methods, $properties); + $functions = array('range'); + $policy = new Twig_Sandbox_SecurityPolicy($tags, $filters, $methods, $properties, $functions); With the previous configuration, the security policy will only allow usage of the ``if`` tag, and the ``upper`` filter. Moreover, the templates will only be