Menu

## ReadonlyTokenEmulator extends KeywordEmulator
in package

ReadonlyTokenEmulator.php : 7

### Table of Contents

emulate() : array<string|int, mixed>
getKeywordString() : string
getKeywordToken() : int
getPhpVersion() : string
isEmulationNeeded() : bool
reverseEmulate() : array<string|int, mixed>
isKeywordContext() : bool
getPreviousNonSpaceToken() : array<string|int, mixed>|null

### Methods

#### emulate()

KeywordEmulator.php : 21
`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()

ReadonlyTokenEmulator.php : 14
`public getKeywordString() : string`

##### Return values

string —

#### getKeywordToken()

ReadonlyTokenEmulator.php : 19
`public getKeywordToken() : int`

##### Return values

int —

#### getPhpVersion()

ReadonlyTokenEmulator.php : 9
`public getPhpVersion() : string`

##### Return values

string —

#### isEmulationNeeded()

KeywordEmulator.php : 10
`public isEmulationNeeded(string $code) : bool`

##### Parameters

$code : string

##### Return values

bool —

#### reverseEmulate()

KeywordEmulator.php : 51
`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()

KeywordEmulator.php : 15
`protected isKeywordContext(array<string|int, mixed> $tokens, int $pos) : bool`

##### Parameters

$tokens : array<string|int, mixed>
$pos : int

##### Return values

bool —

#### getPreviousNonSpaceToken()

KeywordEmulator.php : 38
`private getPreviousNonSpaceToken(array<string|int, mixed> $tokens, int $start) : array<string|int, mixed>|null`

##### Parameters

$tokens : array<string|int, mixed>
$start : int

##### Return values

array<string|int, mixed>|null —

## Search results