|
static | createContext ($username, $role) |
|
static | call ($service, $method, $params, $context, $mode=Rpc::MODE_LOCAL, $restoreSrvEnv=FALSE) |
|
|
const | MODE_LOCAL = 0x1 |
|
const | MODE_REMOTE = 0x2 |
|
This class provides methods regarding remote procedure calls.
◆ call()
static OMV\Rpc\Rpc::call |
( |
|
$service, |
|
|
|
$method, |
|
|
|
$params, |
|
|
|
$context, |
|
|
|
$mode = Rpc::MODE_LOCAL , |
|
|
|
$restoreSrvEnv = FALSE |
|
) |
| |
|
static |
Execute the given RPC.
- Parameters
-
service | The name of the service. |
method | The name of the method. |
params | The parameters hash object to be passed to the method of the given service. |
context | The context hash object of the caller containing the fields username and role. |
mode | The mode how to execute this RPC. The following modes are available:
MODE_LOCAL
- MODE_REMOTE Defaults to MODE_LOCAL.
|
restoreSrvEnv | Restore various web server and execution environment information. This might be helpful in some cases if these information are required in the engine backend. Note, this only takes action when mode is MODE_REMOTE. Defauts to FALSE. |
- Returns
- The RPC response.
◆ createContext()
static OMV\Rpc\Rpc::createContext |
( |
|
$username, |
|
|
|
$role |
|
) |
| |
|
static |
Create a context.
- Returns
- The context using the specified parameters.
The documentation for this class was generated from the following file: