[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/phpbb/template/twig/ -> lexer.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 368 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

lexer:: (9 methods):
  set_environment()
  tokenize()
  strip_surrounding_quotes()
  fix_inline_variable_tokens()
  add_surrounding_quotes()
  fix_begin_tokens()
  fix_if_tokens()
  fix_define_tokens()
  replace_twig_tag_masks()


Class: lexer  - X-Ref

set_environment(\Twig_Environment $env)   X-Ref
No description

tokenize($code, $filename = null)   X-Ref
No description

strip_surrounding_quotes($tokens, $code)   X-Ref
Strip surrounding quotes

First step to fix tokens that may have inline variables
E.g. <!-- INCLUDE '{TEST}.html' to <!-- INCLUDE {TEST}.html

param: array $tokens array of tokens to search for (imploded to a regular expression)
param: string $code
return: string

fix_inline_variable_tokens($tokens, $code)   X-Ref
Fix tokens that may have inline variables

Second step to fix tokens that may have inline variables
E.g. <!-- INCLUDE '{TEST}.html' to <!-- INCLUDE ' ~ {TEST} ~ '.html

param: array $tokens array of tokens to search for (imploded to a regular expression)
param: string $code
return: string

add_surrounding_quotes($tokens, $code)   X-Ref
Add surrounding quotes

Last step to fix tokens that may have inline variables
E.g. <!-- INCLUDE '{TEST}.html' to <!-- INCLUDE '' ~ {TEST} ~ '.html'

param: array $tokens array of tokens to search for (imploded to a regular expression)
param: string $code
return: string

fix_begin_tokens($code, $parent_nodes = array()   X-Ref
Fix begin tokens (convert our BEGIN to Twig for)

Not meant to be used outside of this context, public because the anonymous function calls this

param: string $code
param: array $parent_nodes (used in recursion)
return: string

fix_if_tokens($code)   X-Ref
Fix IF statements

param: string $code
return: string

fix_define_tokens($code)   X-Ref
Fix DEFINE statements and {$VARNAME} variables

param: string $code
return: string

replace_twig_tag_masks($code, $twig_tags)   X-Ref
Replace Twig tag masks with Twig tag calls

E.g. <!-- BLOCK foo --> with {% block foo %}

param: string $code
param: array $twig_tags All tags we want to create a mask for
return: string



Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1