interface InvokedProcess

Methods

int|null
id()

Get the process ID if the process is still running.

string
command()

Get the command line for the process.

signal(int $signal)

Send a signal to the process.

int|null
stop(float $timeout = 10, int|null $signal = null)

Stop the process if it is still running.

bool
running()

Determine if the process is still running.

string
output()

Get the standard output for the process.

string
errorOutput()

Get the error output for the process.

string
latestOutput()

Get the latest standard output for the process.

string
latestErrorOutput()

Get the latest error output for the process.

void
ensureNotTimedOut()

Ensure that the process has not timed out.

wait(callable|null $output = null)

Wait for the process to finish.

waitUntil(callable|null $output = null)

Wait until the given callback returns true.

Details

at line 12
int|null id()

Get the process ID if the process is still running.

Return Value

int|null

at line 17
string command()

Get the command line for the process.

Return Value

string

at line 22
InvokedProcess signal(int $signal)

Send a signal to the process.

Parameters

int $signal

Return Value

InvokedProcess

at line 27
int|null stop(float $timeout = 10, int|null $signal = null)

Stop the process if it is still running.

Parameters

float $timeout
int|null $signal

Return Value

int|null

at line 32
bool running()

Determine if the process is still running.

Return Value

bool

at line 37
string output()

Get the standard output for the process.

Return Value

string

at line 42
string errorOutput()

Get the error output for the process.

Return Value

string

at line 47
string latestOutput()

Get the latest standard output for the process.

Return Value

string

at line 52
string latestErrorOutput()

Get the latest error output for the process.

Return Value

string

at line 57
void ensureNotTimedOut()

Ensure that the process has not timed out.

Return Value

void

at line 62
ProcessResult wait(callable|null $output = null)

Wait for the process to finish.

Parameters

callable|null $output

Return Value

ProcessResult

at line 67
ProcessResult waitUntil(callable|null $output = null)

Wait until the given callback returns true.

Parameters

callable|null $output

Return Value

ProcessResult