aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/template/twig/lexer.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/template/twig/lexer.php')
-rw-r--r--phpBB/phpbb/template/twig/lexer.php16
1 files changed, 3 insertions, 13 deletions
diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php
index d0bcfa615e..6615a46067 100644
--- a/phpBB/phpbb/template/twig/lexer.php
+++ b/phpBB/phpbb/template/twig/lexer.php
@@ -15,20 +15,10 @@ namespace phpbb\template\twig;
class lexer extends \Twig_Lexer
{
- public function set_environment(\Twig_Environment $env)
+ public function tokenize(\Twig_Source $source)
{
- $this->env = $env;
- }
-
- public function tokenize($code, $filename = null)
- {
- // Handle \Twig_Source format input
- if ($code instanceof \Twig_Source)
- {
- $source = $code;
- $code = $source->getCode();
- $filename = $source->getName();
- }
+ $code = $source->getCode();
+ $filename = $source->getName();
// Our phpBB tags
// Commented out tokens are handled separately from the main replace