Documentation

BlockToken extends AbstractToken
in package

Tags
phpstan-extends

AbstractToken<Token[], Token[]>

Table of Contents

Properties

$data  : mixed
$parent  : BlockToken|null
$previousToken  : Token|null

Methods

__construct()  : mixed
Constructs a BlockToken.
addToken()  : void
calculateEndPosition()  : Position
calculateStartPosition()  : Position
getBlockCurrentToken()  : Token|null
Get the current token of a given class.
getEnd()  : Position|null
getParent()  : BlockToken|null
getPreviousToken()  : Token|null
getStart()  : Position
getType()  : string
getValue()  : TValue
isComplete()  : bool
jsonSerialize()  : SerializedToken
Returns a JSON serializable representation of the token.
setEnd()  : self
setParent()  : self
setPreviousToken()  : self

Properties

Methods

__construct()

Constructs a BlockToken.

public __construct(array<string|int, Token$value, Position $start[, Position|null $end = null ]) : mixed
Parameters
$value : array<string|int, Token>

The value of the block token, typically an array of properties.

$start : Position

The start position of the block in the source.

$end : Position|null = null

The end position of the block in the source.

getBlockCurrentToken()

Get the current token of a given class.

public getBlockCurrentToken() : Token|null
Return values
Token|null

The current token of the given class, or null if not found.

getValue()

public getValue() : TValue
Return values
TValue

jsonSerialize()

Returns a JSON serializable representation of the token.

public jsonSerialize() : SerializedToken
Return values
SerializedToken

setPreviousToken()

public setPreviousToken(Token|null $previousToken) : self
Parameters
$previousToken : Token|null
Return values
self

        
On this page

Search results