openmediavault  4.0 (Arrakis)
The open network attached storage solution
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OMV\Rpc\Proxy\Json Class Reference
Inheritance diagram for OMV\Rpc\Proxy\Json:
OMV\Rpc\Proxy\Download OMV\Rpc\Proxy\Upload

Public Member Functions

 handle ()
 
 cleanup ()
 

Protected Member Functions

 getParams ()
 
 validate ()
 
 preExecute ()
 
 postExecute (&$response)
 
 handleResponse ($response)
 

Protected Attributes

 $params = NULL
 

Detailed Description

The generic RPC proxy implementation that handles JSON RPC requests. A RPC request must contain the fields: service The name of the service. method The name of the method. params The method parameters as JSON string. options An optional array of RPC options with the fields: updatelastaccess Set to FALSE to do not update the time on which the last access took place.

Member Function Documentation

◆ cleanup()

OMV\Rpc\Proxy\Json::cleanup ( )

The function that is called after the RPC has been successfully executed or it has been failed.

◆ getParams()

OMV\Rpc\Proxy\Json::getParams ( )
protected

Get the RPC parameters.

Returns
TRUE if successful, otherwise FALSE.

◆ handle()

OMV\Rpc\Proxy\Json::handle ( )

Handle the RPC request.

Returns
The RPC response as JSON encoded data.

◆ handleResponse()

OMV\Rpc\Proxy\Json::handleResponse (   $response)
protected

Print the RPC responce.

Parameters
responseThe RPC response
Returns
None.

◆ postExecute()

OMV\Rpc\Proxy\Json::postExecute ( $response)
protected

Do additional stuff after RPC has been executed.

Parameters
responseThe RPC response
Returns
None.

◆ preExecute()

OMV\Rpc\Proxy\Json::preExecute ( )
protected

Do additional stuff before RPC is executed.

Returns
None.

◆ validate()

OMV\Rpc\Proxy\Json::validate ( )
protected

Validate the RPC parameters. An exception is thrown when the validation fails.

Returns
None.

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