trait FireTrait

Fire trait.

Methods

string
buildReactorPath()

Returns path to the reactor executable.

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

Returns command that we're going to execute.

int
fire(string $command, Closure $handler, 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 30
protected string buildReactorPath()

Returns path to the reactor executable.

Return Value

string

at line 42
protected 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?

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

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

Parameters

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

Return Value

int

at line 95
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?