diff --git a/flextype/twig/JsonParserTwigExtension.php b/flextype/twig/JsonTwigExtension.php similarity index 80% rename from flextype/twig/JsonParserTwigExtension.php rename to flextype/twig/JsonTwigExtension.php index 6af41721..177ef870 100644 --- a/flextype/twig/JsonParserTwigExtension.php +++ b/flextype/twig/JsonTwigExtension.php @@ -12,7 +12,7 @@ namespace Flextype; use Twig_Extension; use Twig_SimpleFunction; -class JsonParserTwigExtension extends Twig_Extension +class JsonTwigExtension extends Twig_Extension { /** * Returns a list of functions to add to the existing list. @@ -22,8 +22,8 @@ class JsonParserTwigExtension extends Twig_Extension public function getFunctions() : array { return [ - new Twig_SimpleFunction('json_parser_decode', [$this, 'decode']), - new Twig_SimpleFunction('json_parser_encode', [$this, 'encode']), + new Twig_SimpleFunction('json_decode', [$this, 'decode']), + new Twig_SimpleFunction('json_encode', [$this, 'encode']), ]; }