openmediavault  4.0 (Arrakis)
The open network attached storage solution
Static Public Member Functions | Public Attributes | List of all members
OMV\Rpc\Rpc Class Reference

Static Public Member Functions

static createContext ($username, $role)
 
static call ($service, $method, $params, $context, $mode=Rpc::MODE_LOCAL, $restoreSrvEnv=FALSE)
 

Public Attributes

const MODE_LOCAL = 0x1
 
const MODE_REMOTE = 0x2
 

Detailed Description

This class provides methods regarding remote procedure calls.

Member Function Documentation

◆ call()

static OMV\Rpc\Rpc::call (   $service,
  $method,
  $params,
  $context,
  $mode = Rpc::MODE_LOCAL,
  $restoreSrvEnv = FALSE 
)
static

Execute the given RPC.

Parameters
serviceThe name of the service.
methodThe name of the method.
paramsThe parameters hash object to be passed to the method of the given service.
contextThe context hash object of the caller containing the fields username and role.
modeThe mode how to execute this RPC. The following modes are available:
MODE_LOCAL
  • MODE_REMOTE Defaults to MODE_LOCAL.
restoreSrvEnvRestore 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: