Shellbox
Library and server for containerized shell execution
|
Encapsulation of an output file which is sent to a server using a PUT request. More...
Public Member Functions | |
__construct ( $url) | |
headers (array $headers) | |
Replace the current array of headers with the specified list. | |
enableMwContentHash (bool $enable=true) | |
Set a flag which, if enabled, will cause etag and x-object-meta-sha1base36 headers to be set from the content of the file, according to Swift and MediaWiki conventions. | |
getClientData () | |
Get data for JSON serialization by the client. | |
getUrl () | |
Get the URL. | |
getHeaders () | |
Get the headers. | |
isMwContentHashEnabled () | |
Determine whether MW content hashing is enabled. | |
Public Member Functions inherited from Shellbox\Command\OutputFile | |
onReceived (callable $callback) | |
Add a callback to call after the file is received. | |
requireExitCode (?int $status=0) | |
Upload/return the file only if the command returns the specified exit code. | |
wasReceived () | |
Return true if the file was received from the command or server. | |
getRequiredExitCode () | |
Additional Inherited Members | |
Static Public Member Functions inherited from Shellbox\Command\OutputFile | |
static | newFromClientData ( $data) |
This is used to create a placeholder object for use on the server side. | |
Protected Member Functions inherited from Shellbox\Command\OutputFile | |
setReceived () | |
Set the received flag to true and notify the listeners. | |
Protected Attributes inherited from Shellbox\Command\OutputFile | |
$received = false | |
Encapsulation of an output file which is sent to a server using a PUT request.
Shellbox\Command\OutputFileToUrl::enableMwContentHash | ( | bool | $enable = true | ) |
Set a flag which, if enabled, will cause etag and x-object-meta-sha1base36 headers to be set from the content of the file, according to Swift and MediaWiki conventions.
bool | $enable |
Shellbox\Command\OutputFileToUrl::getClientData | ( | ) |
Get data for JSON serialization by the client.
Reimplemented from Shellbox\Command\OutputFile.
Shellbox\Command\OutputFileToUrl::headers | ( | array | $headers | ) |
Replace the current array of headers with the specified list.
The array should be in Guzzle's format: an associative array where the key is the header name and the value is either a string or an array of strings. Array values are used to send multiple headers with the same name.
array | $headers |