KeywordEmulator
extends TokenEmulator
Table of Contents
-
emulate()
: array<string|int, mixed>
-
getKeywordString()
: string
-
getKeywordToken()
: int
-
isEmulationNeeded()
: bool
-
reverseEmulate()
: array<string|int, mixed>
-
isKeywordContext()
: bool
-
getPreviousNonSpaceToken()
: array<string|int, mixed>|string|null
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
abstract getKeywordString() : string
Return values
string
—
getKeywordToken()
public
abstract getKeywordToken() : int
Return values
int
—
isEmulationNeeded()
public
isEmulationNeeded(string $code) : bool
Parameters
-
$code
: string
-
Return values
bool
—
reverseEmulate()
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, mixed> $tokens, int $pos) : bool
Parameters
-
$tokens
: array<string|int, mixed>
-
-
$pos
: int
-
Return values
bool
—
getPreviousNonSpaceToken()
private
getPreviousNonSpaceToken(array<string|int, mixed> $tokens, int $start) : array<string|int, mixed>|string|null
Parameters
-
$tokens
: array<string|int, mixed>
-
-
$start
: int
-
Return values
array<string|int, mixed>|string|null
—