laravel / 10 / api / 10.x / illuminate / contracts / process / processresult.html

ProcessResult

interface ProcessResult (View source)

Methods

string command()

Get the original command executed by the process.

bool successful()

Determine if the process was successful.

bool failed()

Determine if the process failed.

int|null exitCode()

Get the exit code of the process.

string output()

Get the standard output of the process.

string errorOutput()

Get the error output of the process.

$this throw(callable $callback = null)

Throw an exception if the process failed.

$this throwIf(bool $condition, callable $callback = null)

Throw an exception if the process failed and the given condition is true.

Details

string command()

Get the original command executed by the process.

Return Value

string

bool successful()

Determine if the process was successful.

Return Value

bool

bool failed()

Determine if the process failed.

Return Value

bool

int|null exitCode()

Get the exit code of the process.

Return Value

int|null

string output()

Get the standard output of the process.

Return Value

string

string errorOutput()

Get the error output of the process.

Return Value

string

$this throw(callable $callback = null)

Throw an exception if the process failed.

Parameters

callable $callback

Return Value

$this

$this throwIf(bool $condition, callable $callback = null)

Throw an exception if the process failed and the given condition is true.

Parameters

bool $condition
callable $callback

Return Value

$this

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Contracts/Process/ProcessResult.html