wCMF
3.6
|
Public Member Functions | |
__construct ($serverUrl, $user) | |
call ($request) | |
Protected Member Functions | |
doRemoteCall ($request, $isLogin) | |
doLogin () | |
handleError ($response) | |
Private Attributes | |
$_client = null | |
$_user = null | |
HTTPClient is used to do calls to other wCMF instances over HTTP.
Definition at line 33 of file class.HTTPClient.php.
HTTPClient::__construct | ( | $serverUrl, | |
$user | |||
) |
Constructor
serverUrl | The url of the other server instance. |
user | The remote user instance. |
Definition at line 43 of file class.HTTPClient.php.
HTTPClient::call | ( | $request | ) |
Do a call to the remote server.
request | A Request instance |
Definition at line 59 of file class.HTTPClient.php.
References doRemoteCall().
|
protected |
Do a remote call.
request | The Request instance |
isLogin | True/False wether this request is a login request or not |
Definition at line 70 of file class.HTTPClient.php.
References JSONUtil\decode(), Formatter\deserialize(), doLogin(), Log\error(), MSG_FORMAT_JSON, and WCMFException\throwEx().
Referenced by call(), and doLogin().
|
protected |
Do the login request. If the request is successful, the session id will be set.
Definition at line 121 of file class.HTTPClient.php.
References doRemoteCall(), and WCMFException\throwEx().
Referenced by doRemoteCall().
|
protected |
Error handling method
response | The Response instance |
Definition at line 149 of file class.HTTPClient.php.
References Log\error(), and WCMFException\throwEx().
|
private |
Definition at line 35 of file class.HTTPClient.php.
|
private |
Definition at line 36 of file class.HTTPClient.php.