Lines Matching refs:Twig

1 Twig Internals
4 Twig is very extensible and you can easily hack it. Keep in mind that you
7 useful for people who want to understand how Twig works under the hood.
9 How does Twig work?
12 The rendering of a Twig template can be summarized into four key steps:
30 an instance of ``\Twig\Token``, and the stream is an instance of
31 ``\Twig\TokenStream``). The default lexer recognizes 13 different token types:
33 * ``\Twig\Token::BLOCK_START_TYPE``, ``\Twig\Token::BLOCK_END_TYPE``: Delimiters for blocks (``{% %…
34 * ``\Twig\Token::VAR_START_TYPE``, ``\Twig\Token::VAR_END_TYPE``: Delimiters for variables (``{{ }}…
35 * ``\Twig\Token::TEXT_TYPE``: A text outside an expression;
36 * ``\Twig\Token::NAME_TYPE``: A name in an expression;
37 * ``\Twig\Token::NUMBER_TYPE``: A number in an expression;
38 * ``\Twig\Token::STRING_TYPE``: A string in an expression;
39 * ``\Twig\Token::OPERATOR_TYPE``: An operator;
40 * ``\Twig\Token::PUNCTUATION_TYPE``: A punctuation sign;
41 * ``\Twig\Token::INTERPOLATION_START_TYPE``, ``\Twig\Token::INTERPOLATION_END_TYPE`` (as of Twig 1.…
42 * ``\Twig\Token::EOF_TYPE``: Ends of template.
47 $stream = $twig->tokenize(new \Twig\Source($source, $identifier));
50 ``\Twig\Source`` was introduced in version 1.27, pass the source and the
70 The default lexer (``\Twig\Lexer``) can be changed by calling
79 node tree (an instance of ``\Twig\Node\ModuleNode``). The core extension defines
95 \Twig\Node\ModuleNode(
96 \Twig\Node\TextNode(Hello )
97 \Twig\Node\PrintNode(
98 \Twig\Node\Expression\NameExpression(name)
104 The default parser (``\Twig\TokenParser\AbstractTokenParser``) can be changed by calling the
121 (the actual output can differ depending on the version of Twig you are
125 class __TwigTemplate_1121b6f109fe93ebe8c6e22e3712bceb extends \Twig\Template
139 The default compiler (``\Twig\Compiler``) can be changed by calling the