Shellbox
Library and server for containerized shell execution
|
Class representing the result of running a BoxedCommand. More...
Public Member Functions | |
addOutputFile ( $name, OutputFile $outputFile) | |
Add an output file to the result. | |
getFileContents ( $name) | |
Get the contents of an output file as a string. | |
wasReceived ( $name) | |
Query whether an output file was received. | |
wasGenerated ( $name) | |
Query whether an output file was generated by the command. | |
getFileNames () | |
Get the names of all files which were registered and were created by the command. | |
getReceivedFileNames () | |
Get the names of all files which were received. | |
getUploadedFileNames () | |
Get the names of all files which were uploaded. | |
Public Member Functions inherited from Shellbox\Command\UnboxedResult | |
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 ) | |
Class representing the result of running a BoxedCommand.
Shellbox\Command\BoxedResult::getFileContents | ( | $name | ) |
Get the contents of an output file as a string.
string | $name | The file name relative to the working directory |
Shellbox\Command\BoxedResult::getFileNames | ( | ) |
Get the names of all files which were registered and were created by the command.
Reimplemented in Shellbox\Command\ServerBoxedResult.
Shellbox\Command\BoxedResult::getReceivedFileNames | ( | ) |
Get the names of all files which were received.
This is all generated files except for uploaded files.
Reimplemented in Shellbox\Command\ServerBoxedResult.
Shellbox\Command\BoxedResult::getUploadedFileNames | ( | ) |
Get the names of all files which were uploaded.
Shellbox\Command\BoxedResult::wasGenerated | ( | $name | ) |
Query whether an output file was generated by the command.
string | $name |
Shellbox\Command\BoxedResult::wasReceived | ( | $name | ) |
Query whether an output file was received.
Files that are uploaded to a URL are not included in this.
string | $name |