OpenMediaVault  0.6 (Kralizec)
The open network attached storage solution
 All Classes Functions Variables Groups Pages
Static Public Member Functions | List of all members
Inheritance diagram for OMVRpc:
OMVObject

Static Public Member Functions

static exec ($service, $method, $params, $context, $mode=OMV_RPC_MODE_LOCAL, $restoreSrvEnv=FALSE)
 

Additional Inherited Members

- Public Member Functions inherited from OMVObject
 __construct ()
 
 getLastError ()
 
- Protected Member Functions inherited from OMVObject
 setLastError ($error)
 
 debug ()
 

Detailed Description

This file is part of OpenMediaVault.

License:
http://www.gnu.org/licenses/gpl.html GPL Version 3
Author
Volker Theile volke.nosp@m.r.th.nosp@m.eile@.nosp@m.open.nosp@m.media.nosp@m.vaul.nosp@m.t.org

OpenMediaVault is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

OpenMediaVault is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with OpenMediaVault. If not, see http://www.gnu.org/licenses/. This class provides methods regarding remote procedure calls.

Member Function Documentation

static OMVRpc::exec (   $service,
  $method,
  $params,
  $context,
  $mode = OMV_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:
OMV_RPC_MODE_LOCAL
  • OMV_RPC_MODE_REMOTE Defaults to OMV_RPC_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 OMV_RPC_MODE_REMOTE. Defauts to FALSE.
Returns
The RPC response.
Exceptions
E_RPC_SERVICE_NOT_FOUND
E_RPC_SERVICE_METHOD_NOT_EXISTS
E_MISC_FAILURE
E_ENGINED_CREATE_SOCKET
E_ENGINED_CONNECT_SOCKET
E_ENGINED_WRITE_SOCKET
E_ENGINED_READ_SOCKET

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