ReverseEmulator
extends TokenEmulator
in package
FinalYes
Reverses emulation direction of the inner emulator.
Table of Contents
Properties
- $emulator : TokenEmulator
Methods
- __construct() : mixed
- emulate() : array<string|int, mixed>
- getPhpVersion() : PhpVersion
- isEmulationNeeded() : bool
- preprocessCode() : string
- reverseEmulate() : array<string|int, mixed>
Properties
$emulator
private
TokenEmulator
$emulator
Inner emulator
Methods
__construct()
public
__construct(TokenEmulator $emulator) : mixed
Parameters
- $emulator : TokenEmulator
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>getPhpVersion()
public
getPhpVersion() : PhpVersion
Return values
PhpVersionisEmulationNeeded()
public
isEmulationNeeded(string $code) : bool
Parameters
- $code : string
Return values
boolpreprocessCode()
public
preprocessCode(string $code, array<string|int, mixed> &$patches) : string
Parameters
- $code : string
- $patches : array<string|int, mixed>
Return values
stringreverseEmulate()
public
reverseEmulate(string $code, array<string|int, mixed> $tokens) : array<string|int, mixed>
Parameters
- $code : string
- $tokens : array<string|int, mixed>