Shellbox
Library and server for containerized shell execution
|
The Shellbox server main class. More...
Public Member Functions | |
getConfig ( $name) | |
Get a configuration variable. | |
forgetConfig ( $name) | |
Forget a configuration variable. | |
handleError ( $level, $message, $file, $line) | |
Handle an error. | |
flushLogBuffer () | |
Get the buffered log entries to return to the client, and clear the buffer. | |
Static Public Member Functions | |
static | main ( $configPath=null) |
The main entry point. | |
Protected Member Functions | |
execute ( $configPath) | |
Non-static entry point. | |
The Shellbox server main class.
To use this, create a PHP entry point file with:
require DIR . '/vendor/autoload.php'; Shellbox\Server::main();
|
protected |
Non-static entry point.
string | null | $configPath |
Shellbox\Server::flushLogBuffer | ( | ) |
Get the buffered log entries to return to the client, and clear the buffer.
If logToClient is false, this returns an empty array.
Shellbox\Server::forgetConfig | ( | $name | ) |
Forget a configuration variable.
This is used to try to hide the HMAC key from code which is run by the call action.
string | $name |
Shellbox\Server::getConfig | ( | $name | ) |
Get a configuration variable.
string | $name |
Shellbox\Server::handleError | ( | $level, | |
$message, | |||
$file, | |||
$line ) |
Handle an error.
int | $level | |
string | $message | |
string | $file | |
int | $line |
|
static |
The main entry point.
Call this from the webserver.
string | null | $configPath | The location of the JSON config file |