Token
in package
FinalYes
Tags
Table of Contents
Properties
- $position : int
- The position of the token in the input string
- $type : T|null
- The type of the token (identifier, numeric, string, input parameter, none)
- $value : string|int
- The string value of the token in the input string
Methods
- __construct() : mixed
- fromArray() : Token
- fromObject() : Token
- isA() : bool
Properties
$position
The position of the token in the input string
public
int
$position
Tags
$type
The type of the token (identifier, numeric, string, input parameter, none)
public
T|null
$type
Tags
$value
The string value of the token in the input string
public
string|int
$value
Tags
Methods
__construct()
public
__construct(string|int $value, string|int $type, int $position) : mixed
Parameters
- $value : string|int
- $type : string|int
- $position : int
fromArray()
public
static fromArray(array<string|int, mixed> $source) : Token
Parameters
- $source : array<string|int, mixed>
Return values
TokenfromObject()
public
static fromObject(object $source) : Token
Parameters
- $source : object
Return values
TokenisA()
public
isA(T ...$types) : bool
Parameters
- $types : T