PropertyTokenEmulator
extends KeywordEmulator
in package
FinalYes
Table of Contents
Methods
- emulate() : array<string|int, mixed>
- getKeywordString() : string
- getKeywordToken() : int
- getPhpVersion() : PhpVersion
- isEmulationNeeded() : bool
- reverseEmulate() : array<string|int, mixed>
- isKeywordContext() : bool
- getPreviousNonSpaceToken() : Token|null
Methods
emulate()
public
emulate(string $code, array<string|int, mixed> $tokens) : array<string|int, mixed>
Parameters
- $code : string
- $tokens : array<string|int, mixed>
Return values
array<string|int, mixed>getKeywordString()
public
getKeywordString() : string
Return values
stringgetKeywordToken()
public
getKeywordToken() : int
Return values
intgetPhpVersion()
public
getPhpVersion() : PhpVersion
Return values
PhpVersionisEmulationNeeded()
public
isEmulationNeeded(string $code) : bool
Parameters
- $code : string
Return values
boolreverseEmulate()
public
reverseEmulate(string $code, array<string|int, mixed> $tokens) : array<string|int, mixed>
Parameters
- $code : string
- $tokens : array<string|int, mixed>
Return values
array<string|int, mixed>isKeywordContext()
protected
isKeywordContext(array<string|int, Token> $tokens, int $pos) : bool
Parameters
- $tokens : array<string|int, Token>
- $pos : int
Return values
boolgetPreviousNonSpaceToken()
private
getPreviousNonSpaceToken(array<string|int, Token> $tokens, int $start) : Token|null
Parameters
- $tokens : array<string|int, Token>
- $start : int