Documentation

PropertyToken extends AbstractToken
in package
implements TokenBoundary

Tags
phpstan-extends

AbstractToken<array{name: string, value: string|null}, string|null>

Table of Contents

Interfaces

TokenBoundary

Properties

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

Methods

__construct()  : mixed
Constructs a PropertyToken.
calculateEndPosition()  : Position
calculateStartPosition()  : Position
canTransitionTo()  : bool
Check if this token can transition to another token type
getEnd()  : Position|null
getName()  : string
Gets the property name.
getParent()  : BlockToken|null
getPreviousToken()  : Token|null
getStart()  : Position
getType()  : string
getValue()  : TValue
Gets the property value.
isComplete()  : bool
isVariable()  : bool
jsonSerialize()  : SerializedToken
Returns a JSON serializable representation of the token.
setEnd()  : self
setName()  : self
setParent()  : self
setPreviousToken()  : self
setValue()  : self

Properties

Methods

__construct()

Constructs a PropertyToken.

public __construct(string $name, string $value, Position $start[, Position|null $end = null ]) : mixed
Parameters
$name : string

The property name

$value : string

The property value

$start : Position

The start position of the property in the source

$end : Position|null = null

The end position of the property in the source

canTransitionTo()

Check if this token can transition to another token type

public canTransitionTo(string $tokenClass, TokenizerContext $tokenizerContext) : bool
Parameters
$tokenClass : string
$tokenizerContext : TokenizerContext
Return values
bool

getName()

Gets the property name.

public getName() : string
Return values
string

getValue()

Gets the property value.

public getValue() : TValue
Return values
TValue

jsonSerialize()

Returns a JSON serializable representation of the token.

public jsonSerialize() : SerializedToken
Return values
SerializedToken

setName()

public setName(string $name) : self
Parameters
$name : string
Return values
self

setPreviousToken()

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

setValue()

public setValue(string $value) : self
Parameters
$value : string
Return values
self

        
On this page

Search results