HumHub Documentation (unofficial)

Token
in package

FinalYes
Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

Constants

ARROW_TYPE  = 12
BLOCK_END_TYPE  = 3
BLOCK_START_TYPE  = 1
EOF_TYPE  = -1
INTERPOLATION_END_TYPE  = 11
INTERPOLATION_START_TYPE  = 10
NAME_TYPE  = 5
NUMBER_TYPE  = 6
OPERATOR_TYPE  = 8
PUNCTUATION_TYPE  = 9
SPREAD_TYPE  = 13
STRING_TYPE  = 7
TEXT_TYPE  = 0
VAR_END_TYPE  = 4
VAR_START_TYPE  = 2

Properties

$lineno  : mixed
$type  : mixed
$value  : mixed

Methods

__construct()  : mixed
__toString()  : mixed
getLine()  : int
getType()  : int
getValue()  : mixed
test()  : bool
Tests the current token for a type and/or a value.
typeToEnglish()  : string
typeToString()  : string

Constants

ARROW_TYPE

public mixed ARROW_TYPE = 12

BLOCK_END_TYPE

public mixed BLOCK_END_TYPE = 3

BLOCK_START_TYPE

public mixed BLOCK_START_TYPE = 1

EOF_TYPE

public mixed EOF_TYPE = -1

INTERPOLATION_END_TYPE

public mixed INTERPOLATION_END_TYPE = 11

INTERPOLATION_START_TYPE

public mixed INTERPOLATION_START_TYPE = 10

NAME_TYPE

public mixed NAME_TYPE = 5

NUMBER_TYPE

public mixed NUMBER_TYPE = 6

OPERATOR_TYPE

public mixed OPERATOR_TYPE = 8

PUNCTUATION_TYPE

public mixed PUNCTUATION_TYPE = 9

SPREAD_TYPE

public mixed SPREAD_TYPE = 13

STRING_TYPE

public mixed STRING_TYPE = 7

TEXT_TYPE

public mixed TEXT_TYPE = 0

VAR_END_TYPE

public mixed VAR_END_TYPE = 4

VAR_START_TYPE

public mixed VAR_START_TYPE = 2

Properties

$lineno

private mixed $lineno

Methods

__construct()

public __construct(int $type, mixed $value, int $lineno) : mixed
Parameters
$type : int
$value : mixed
$lineno : int

__toString()

public __toString() : mixed

getLine()

public getLine() : int
Return values
int

getType()

public getType() : int
Return values
int

getValue()

public getValue() : mixed

test()

Tests the current token for a type and/or a value.

public test(array<string|int, mixed>|string|int $type[, array<string|int, mixed>|string|null $values = null ]) : bool

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)
Parameters
$type : array<string|int, mixed>|string|int

The type to test

$values : array<string|int, mixed>|string|null = null

The token value

Return values
bool

typeToEnglish()

public static typeToEnglish(int $type) : string
Parameters
$type : int
Return values
string

typeToString()

public static typeToString(int $type[, bool $short = false ]) : string
Parameters
$type : int
$short : bool = false
Return values
string
Loading…
On this page

Search results