trait FireTrait

Fire trait.

Properties

Application $app

Methods

string
buildReactorPath()

Returns path to the reactor executable.

string
buildCommand(string $command, bool $background = false, bool $sameEnvironment = true)

Returns command that we're going to execute.

int
fire(string $command, Closure|null $handler = null, bool $sameEnvironment = true)

Runs command as a separate process and feeds output to handler.

fireAndForget(string $command, bool $sameEnvironment = true)

Starts command as a background process.

Details

at line 32
protected string buildReactorPath()

Returns path to the reactor executable.

Return Value

string

at line 45
protected string buildCommand(string $command, bool $background = false, bool $sameEnvironment = true)

Returns command that we're going to execute.

Parameters

string $command Command
bool $background Is it a background process?
bool $sameEnvironment Run command using the same environment?

Return Value

string

at line 80
protected int fire(string $command, Closure|null $handler = null, bool $sameEnvironment = true)

Runs command as a separate process and feeds output to handler.

Parameters

string $command Command
Closure|null $handler Output handler
bool $sameEnvironment Run command using the same environment?

Return Value

int

at line 103
protected fireAndForget(string $command, bool $sameEnvironment = true)

Starts command as a background process.

Parameters

string $command Command
bool $sameEnvironment Run command using the same environment?