mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-14 04:42:04 +02:00
[ticket/14948] Update lexer to be compatible with twig 2.6
PHPBB3-14948
This commit is contained in:
parent
e7795fe7ce
commit
9f19202152
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user