From: Jordi Boggiano Date: Thu, 21 Oct 2010 18:17:56 +0000 (+0200) Subject: Removed unnecessary twig_constant_filter function X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=abdee6a8cd34adb7289402fda771ae569672c4f5;p=web%2Fkonrad%2Ftwig.git Removed unnecessary twig_constant_filter function --- diff --git a/lib/Twig/Extension/Core.php b/lib/Twig/Extension/Core.php index 66342e5..c00c328 100644 --- a/lib/Twig/Extension/Core.php +++ b/lib/Twig/Extension/Core.php @@ -55,7 +55,7 @@ class Twig_Extension_Core extends Twig_Extension 'upper' => new Twig_Filter_Function('strtoupper'), 'lower' => new Twig_Filter_Function('strtolower'), 'striptags' => new Twig_Filter_Function('strip_tags'), - 'constant' => new Twig_Filter_Function('twig_constant_filter'), + 'constant' => new Twig_Filter_Function('constant'), // array helpers 'join' => new Twig_Filter_Function('twig_join_filter'), @@ -201,11 +201,6 @@ function twig_cycle_filter($values, $i) return $values[$i % count($values)]; } -function twig_constant_filter($constant) -{ - return constant($constant); -} - function twig_strtr($pattern, $replacements) { return str_replace(array_keys($replacements), array_values($replacements), $pattern);