wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
RPCClient Class Reference

Public Member Functions

 __construct ($serverCli, $user)
 
 call ($request)
 

Public Attributes

const SIDS_SESSION_VARNAME = 'RPCClient.sids'
 

Protected Member Functions

 doRemoteCall ($request, $isLogin)
 
 doLogin ()
 
 setSessionId ($sessionId)
 
 getSessionId ()
 
 handleError ($response)
 

Private Attributes

 $_serverCli = null
 
 $_php = null
 
 $_user = null
 

Detailed Description

RPCClient is used to do calls to other wCMF instances on the same maschine.

wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH

Licensed under the terms of any of the following licenses at your choice:

See the license.txt file distributed with this work for additional information.

$Id$

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 31 of file class.RPCClient.php.

Constructor & Destructor Documentation

RPCClient::__construct (   $serverCli,
  $user 
)

Constructor

Parameters
serverCliThe command line interface of the other server instance.
userThe remote user instance.

Definition at line 45 of file class.RPCClient.php.

References InifileParser\getInstance(), SessionData\getInstance(), and WCMFException\throwEx().

+ Here is the call graph for this function:

Member Function Documentation

RPCClient::call (   $request)

Do a call to the remote server.

Parameters
requestA Request instance
Returns
A Response instance

Definition at line 75 of file class.RPCClient.php.

References doRemoteCall().

+ Here is the call graph for this function:

RPCClient::doRemoteCall (   $request,
  $isLogin 
)
protected

Do a remote call.

Parameters
requestThe Request instance
isLoginTrue/False wether this request is a login request or not
Returns
The Response instance

Definition at line 86 of file class.RPCClient.php.

References Log\debug(), JSONUtil\decode(), Formatter\deserialize(), doLogin(), getSessionId(), handleError(), Log\isDebugEnabled(), and MSG_FORMAT_JSON.

Referenced by call(), and doLogin().

+ Here is the call graph for this function:

RPCClient::doLogin ( )
protected

Do the login request. If the request is successful, the session id will be set.

Returns
True on success

Definition at line 146 of file class.RPCClient.php.

References doRemoteCall(), setSessionId(), and WCMFException\throwEx().

Referenced by doRemoteCall().

+ Here is the call graph for this function:

RPCClient::setSessionId (   $sessionId)
protected

Store the session id for our server in the local session

Returns
The session id or null

Definition at line 176 of file class.RPCClient.php.

References $_serverCli, and SessionData\getInstance().

Referenced by doLogin().

+ Here is the call graph for this function:

RPCClient::getSessionId ( )
protected

Get the session id for our server from the local session

Returns
The session id or null

Definition at line 187 of file class.RPCClient.php.

References $_serverCli, and SessionData\getInstance().

Referenced by doRemoteCall().

+ Here is the call graph for this function:

RPCClient::handleError (   $response)
protected

Error handling method

Parameters
responseThe Response instance

Definition at line 201 of file class.RPCClient.php.

References Log\error(), and WCMFException\throwEx().

Referenced by doRemoteCall().

+ Here is the call graph for this function:

Member Data Documentation

const RPCClient::SIDS_SESSION_VARNAME = 'RPCClient.sids'

Definition at line 34 of file class.RPCClient.php.

RPCClient::$_serverCli = null
private

Definition at line 36 of file class.RPCClient.php.

Referenced by getSessionId(), and setSessionId().

RPCClient::$_php = null
private

Definition at line 37 of file class.RPCClient.php.

RPCClient::$_user = null
private

Definition at line 38 of file class.RPCClient.php.


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