twig.extension.intl:
class: Twig_Extensions_Extension_Intl
tags: [ twig.extension ]
+ rapsys_blog.twig.base64:
+ class: Rapsys\BlogBundle\Twig\Base64Extension
+ tags: [ twig.extension ]
--- /dev/null
+<?php
+// src/Rapsys/BlogBundle/Twig/Base64Extension.php
+namespace Rapsys\BlogBundle\Twig;
+
+class Base64Extension extends \Twig_Extension {
+ public function getFilters() {
+ return array(
+ new \Twig_SimpleFilter('base64_encode', 'base64_encode'),
+ new \Twig_SimpleFilter('base64_decode', 'base64_decode')
+ );
+ }
+}