Shellbox
Library and server for containerized shell execution
|
The base class for encapsulated output files. More...
Public Member Functions | |
getInstance ( $boxedName) | |
Get an OutputFile corresponding to an instance of the OutputEntity. | |
copyFromFile ( $sourcePath) | |
Copy from the specified source path to the registered destination location, which may be either a string or a path outside the working directory. | |
getContents () | |
Get the contents of the output file from its final destination. | |
readFromMultipart (MultipartReader $multipartReader) | |
Copy from the MultipartReader to the registered destination location. | |
wasReceived () | |
Return true if the file was received from the command or server. | |
getClientData () | |
Static Public Member Functions | |
static | newFromClientData ( $data) |
This is used to create a placeholder object for use on the server side. | |
Protected Attributes | |
$received = false | |
The base class for encapsulated output files.
|
abstract |
Copy from the specified source path to the registered destination location, which may be either a string or a path outside the working directory.
string | $sourcePath |
Reimplemented in Shellbox\Command\OutputFilePlaceholder, Shellbox\Command\OutputFileToFile, Shellbox\Command\OutputFileToStream, and Shellbox\Command\OutputFileToString.
|
abstract |
Get the contents of the output file from its final destination.
This should be called after copyFromFile() or readFromMultipart(). It will throw if the file is not readable.
ShellboxError |
Reimplemented in Shellbox\Command\OutputFilePlaceholder, Shellbox\Command\OutputFileToFile, Shellbox\Command\OutputFileToStream, and Shellbox\Command\OutputFileToString.
Shellbox\Command\OutputFile::getInstance | ( | $boxedName | ) |
Get an OutputFile corresponding to an instance of the OutputEntity.
For OutputFile objects this returns $this. For OutputGlob objects it returns an OutputFile object for a file that matches the glob.
string | $boxedName |
Reimplemented from Shellbox\Command\OutputEntity.
|
static |
This is used to create a placeholder object for use on the server side.
It doesn't need to actually be functional since the server is responsible for reading output files.
array | $data |
|
abstract |
Copy from the MultipartReader to the registered destination location.
The MultipartReader must be at the appropriate place in the input stream. Used by the client.
MultipartReader | $multipartReader |
Reimplemented in Shellbox\Command\OutputFilePlaceholder, Shellbox\Command\OutputFileToFile, Shellbox\Command\OutputFileToStream, and Shellbox\Command\OutputFileToString.
Shellbox\Command\OutputFile::wasReceived | ( | ) |
Return true if the file was received from the command or server.