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

A client that executes PHP code on Shellbox server. More...

+ Inheritance diagram for Shellbox\RPC\RpcClient:

Public Member Functions

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

Detailed Description

A client that executes PHP code on Shellbox server.

Member Function Documentation

◆ call()

Shellbox\RPC\RpcClient::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

Implemented in Shellbox\RPC\LocalRpcClient.


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