Shellbox
Library and server for containerized shell execution
|
An executor which runs a BoxedCommand locally. More...
Public Member Functions | |
__construct (UnboxedExecutor $unboxedExecutor, TempDirManager $tempDirManager) | |
executeValid (BoxedCommand $command) | |
Execute a BoxedCommand that has already been validated. | |
setLogger (LoggerInterface $logger) | |
Set the logger. | |
Public Member Functions inherited from Shellbox\Command\BoxedExecutor | |
execute (BoxedCommand $command) | |
Execute a boxed command. | |
createCommand () | |
Create an empty command linked to this executor. | |
setValidationConfig ( $config) | |
Set validation configuration. | |
Protected Member Functions | |
createInputFiles (BoxedCommand $command) | |
Copy input files from the BoxedCommand to the working directory, ready for command execution. | |
prepareOutputDirectories (BoxedCommand $command) | |
Ensure that any subdirectories named in registered output files are created, so that the command can write the files there. | |
applyBoxConfig (BoxedCommand $command) | |
Modify the configuration of the command as required by the BoxedCommand abstraction, returning a cloned BoxedCommand. | |
findOutputFiles (BoxedCommand $command) | |
This is called after the command has run. | |
collectOutputFiles (BoxedCommand $command, BoxedResult $result) | |
This is called after the command has run. | |
Protected Member Functions inherited from Shellbox\Command\BoxedExecutor | |
assertIsValid (BoxedCommand $command) | |
Validate the command. | |
Protected Attributes | |
$unboxedExecutor | |
$tempDirManager | |
$logger | |
Protected Attributes inherited from Shellbox\Command\BoxedExecutor | |
$validator | |
An executor which runs a BoxedCommand locally.
This is overridden by ServerBoxedExecutor, which runs a BoxedCommand in the context of a Server.
Shellbox\Command\LocalBoxedExecutor::__construct | ( | UnboxedExecutor | $unboxedExecutor, |
TempDirManager | $tempDirManager ) |
UnboxedExecutor | $unboxedExecutor | |
TempDirManager | $tempDirManager |
|
protected |
Modify the configuration of the command as required by the BoxedCommand abstraction, returning a cloned BoxedCommand.
BoxedCommand | $command |
|
protected |
This is called after the command has run.
Find output files and copy them to the registered destination location, which may be either a path outside the working directory, or a string. Register the details in the supplied BoxedResult.
BoxedCommand | $command | |
BoxedResult | $result |
|
protected |
Copy input files from the BoxedCommand to the working directory, ready for command execution.
BoxedCommand | $command |
Shellbox\Command\LocalBoxedExecutor::executeValid | ( | BoxedCommand | $command | ) |
Execute a BoxedCommand that has already been validated.
BoxedCommand | $command |
Reimplemented from Shellbox\Command\BoxedExecutor.
Reimplemented in Shellbox\Command\ServerBoxedExecutor.
|
protected |
This is called after the command has run.
Find any output files which match output files and globs that were registered in the BoxedCommand.
BoxedCommand | $command |
|
protected |
Ensure that any subdirectories named in registered output files are created, so that the command can write the files there.
BoxedCommand | $command |
Shellbox\Command\LocalBoxedExecutor::setLogger | ( | LoggerInterface | $logger | ) |
Set the logger.
LoggerInterface | $logger |