Class \Prado\Util\TRpcClient
TRpcClient class
Note: When using setIsNotification(true), every following request is also considered to be a notification until you use setIsNotification(false).
Usage:
First, you can use the factory:
$_rpcClient = TRpcClient::create('xml', 'http://host/server'); $_result = $_rpcClient->remoteMethodName($param, $otherParam);
or as oneliner:
$_result = TRpcClient::create('json', 'http://host/server')->remoteMethod($param, ...);
Second, you can also use the specific implementation directly:
$_rpcClient = new TXmlRpcClient('http://host/server'); $_result = $_rpcClient->remoteMethod($param, ...);
or as oneliner:
$_result = TXmlRpcClient('http://host/server')->hello();
Class hierarchy
Author: Robin J. Rogge <rrogge@bigpoint.net>Since: 3.2
public
|
|
public
static
|
create(mixed $type, mixed $serverUrl[, mixed $isNotification = false ]) : TRpcClient
Creates an instance of the requested RPC client type
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
|
protected
|
performRequest(string $serverUrl, array<string|int, mixed> $payload, string $mimeType) : mixed
Performs the actual request
|
\Prado\TApplicationComponent::FX_CACHE_FILE, \Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |