|
|
| __construct (private int $type, private $value, private int $lineno,) |
|
| __toString () |
| | test ($type, $values=null) |
|
| getLine () |
| | getType () |
|
| getValue () |
|
| toEnglish () |
|
|
static | typeToString (int $type, bool $short=false) |
|
static | typeToEnglish (int $type) |
|
|
const | EOF_TYPE = -1 |
|
const | TEXT_TYPE = 0 |
|
const | BLOCK_START_TYPE = 1 |
|
const | VAR_START_TYPE = 2 |
|
const | BLOCK_END_TYPE = 3 |
|
const | VAR_END_TYPE = 4 |
|
const | NAME_TYPE = 5 |
|
const | NUMBER_TYPE = 6 |
|
const | STRING_TYPE = 7 |
|
const | OPERATOR_TYPE = 8 |
|
const | PUNCTUATION_TYPE = 9 |
|
const | INTERPOLATION_START_TYPE = 10 |
|
const | INTERPOLATION_END_TYPE = 11 |
| const | ARROW_TYPE = 12 |
| const | SPREAD_TYPE = 13 |
◆ getType()
◆ test()
| test |
( |
| $type, |
|
|
| $values = null ) |
Tests the current token for a type and/or a value.
Parameters may be:
- just type
- type and value (or array of possible values)
- just value (or array of possible values) (NAME_TYPE is used as type)
- Paramètres
-
| array | string | int | $type | The type to test |
| array | string | null | $values | The token value |
◆ ARROW_TYPE
- Obsolète
- since Twig 3.21, "arrow" is now an operator
◆ SPREAD_TYPE
- Obsolète
- since Twig 3.21, "spread" is now an operator
La documentation de cette classe a été générée à partir du fichier suivant :
- vendor/twig/twig/src/Token.php