Shellbox
Library and server for containerized shell execution
Loading...
Searching...
No Matches
Shellbox\RPC\LocalRpcClient Class Reference

An implementation of RPCClient that executes the provided commands locally. More...

+ Inheritance diagram for Shellbox\RPC\LocalRpcClient:

Public Member Functions

 call (string $routeName, $functionName, array $params=[], array $options=[])
 Call a PHP function remotely.
 

Detailed Description

An implementation of RPCClient that executes the provided commands locally.

Member Function Documentation

◆ call()

Shellbox\RPC\LocalRpcClient::call ( string $routeName,
$functionName,
array $params = [],
array $options = [] )

Call a PHP function remotely.

Parameters
string$routeNameA short string identifying the function
array | string$functionNameA JSON-serializable callback
array$paramsFunction parameters. If "binary" is false or absent, the parameters must be JSON-serializable, which means that any strings must be valid UTF-8. If "binary" is true, the parameters must all be strings.
array$optionsAn associative array of options:
  • sources: An array of source file paths, to be executed on the remote side prior to calling the function.
  • classes: An array of class names. The source files for the classes will be identified using reflection, and the files will be sent to the server as if they were specified in the "sources" array.
  • binary: If true, $params will be sent as 8-bit clean strings, and the return value will be similarly converted to a string.
Returns
mixed
Exceptions
ShellboxError

Implements Shellbox\RPC\RpcClient.


The documentation for this class was generated from the following file: