Shellbox
Library and server for containerized shell execution
Loading...
Searching...
No Matches
Shellbox\Command\UnboxedResult Class Reference
+ Inheritance diagram for Shellbox\Command\UnboxedResult:

Public Member Functions

 exitCode ( $exitCode)
 Set the exit code.
 
 stdout ( $stdout)
 Set the stdout contents.
 
 stderr ( $stderr)
 Set the stderr contents.
 
 merge (UnboxedResult $other)
 Combine another result with this one.
 
 getExitCode ()
 Returns exit code of the process.
 
 getStdout ()
 Returns stdout of the process.
 
 getStderr ()
 Returns stderr of the process or null if the Command was configured to add stderr to stdout with includeStderr( true )
 

Member Function Documentation

◆ exitCode()

Shellbox\Command\UnboxedResult::exitCode ( $exitCode)

Set the exit code.

Parameters
int$exitCode
Returns
$this

◆ getExitCode()

Shellbox\Command\UnboxedResult::getExitCode ( )

Returns exit code of the process.

Returns
int|null

◆ getStderr()

Shellbox\Command\UnboxedResult::getStderr ( )

Returns stderr of the process or null if the Command was configured to add stderr to stdout with includeStderr( true )

Returns
string|null

◆ getStdout()

Shellbox\Command\UnboxedResult::getStdout ( )

Returns stdout of the process.

Returns
string|null

◆ merge()

Shellbox\Command\UnboxedResult::merge ( UnboxedResult $other)

Combine another result with this one.

The semantics are like the shell's "&&" operator, although in practice we use this to upgrade an UnboxedResult to a BoxedResult, so $this is typically empty.

Parameters
UnboxedResult$other

◆ stderr()

Shellbox\Command\UnboxedResult::stderr ( $stderr)

Set the stderr contents.

Parameters
string$stderr
Returns
$this

◆ stdout()

Shellbox\Command\UnboxedResult::stdout ( $stdout)

Set the stdout contents.

Parameters
string$stdout
Returns
$this

The documentation for this class was generated from the following file: