Token extends AbstractToken
FinalYes
A casual token created from TypoScript source: When having a TypoScript line like "# a comment", then a LineComment is created having a token "T_COMMENT_ONELINE_HASH" and value "# a comment" as assigned TokenStream.
See TokenType for on overview on which TokenTypes can exist.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- __serialize() : array<string|int, mixed>
- Do not store line and column when structure is serialized to cache.
- __toString() : string
- getColumn() : int
- getLine() : int
- getType() : TokenType
- getValue() : string
Properties
$column
protected
int
$column
= 0
$line
protected
int
$line
= 0
$value read-only
protected
string
$value
Methods
__construct()
public
__construct(TokenType $type, string $value[, int $line = 0 ][, int $column = 0 ]) : mixed
Parameters
- $type : TokenType
- $value : string
- $line : int = 0
- $column : int = 0
__serialize()
Do not store line and column when structure is serialized to cache.
public
__serialize() : array<string|int, mixed>
Not storing $line and $column reduces the cache size by about 1/3 since we're typically storing a lot of tokens.
Return values
array<string|int, mixed>__toString()
public
__toString() : string
Return values
stringgetColumn()
public
getColumn() : int
Return values
intgetLine()
public
getLine() : int
Return values
intgetType()
public
getType() : TokenType
Return values
TokenTypegetValue()
public
getValue() : string