Documentation

AtRuleToken extends AbstractToken
in package
implements TokenBoundary

Tags
phpstan-extends

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

Table of Contents

Interfaces

TokenBoundary

Properties

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

Methods

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

Properties

Methods

__construct()

Constructs an AtRuleToken.

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

The at-rule name (without the @ symbol)

$value : string|null

The at-rule value/parameters

$start : Position

The start position of the at-rule in the source

$end : Position|null = null

The end position of the at-rule in the source

canTransitionTo()

Check if this token can transition to another token type

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

getName()

Gets the at-rule name.

public getName() : string
Return values
string

getValue()

Gets the at-rule value/parameters.

public getValue() : TValue
Return values
TValue

isBlock()

public isBlock() : bool
Return values
bool

jsonSerialize()

Returns a JSON serializable representation of the token.

public jsonSerialize() : SerializedToken
Return values
SerializedToken

setIsBlock()

public setIsBlock(bool $isBlock) : self
Parameters
$isBlock : bool
Return values
self

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|null $value) : self
Parameters
$value : string|null
Return values
self

        
On this page

Search results