AbstractToken implements TokenInterface

AbstractYes

Main implementation of a TokenInterface.

Tags
internal:

Internal tokenizer structure.

Table of Contents

Interfaces

TokenInterface
A readonly token: Each line of TypoScript is split into a list of lines consisting of tokens by the tokenizers.

Properties

$column  : int
$line  : int
$value  : string

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

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
string

getColumn()

public getColumn() : int
Return values
int

getLine()

public getLine() : int
Return values
int

getValue()

public getValue() : string
Return values
string

        
On this page

Search results