PHP Class Prado\Util\TRpcClient
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();
Mostra file
Open project: pradosoft/prado
Public Methods
Protected Methods
Method Details
__construct()
public method
public __construct ( $serverUrl, $isNotification = false ) |
create()
public static method
Creates an instance of the requested RPC client type
public static create ( $type, $serverUrl, $isNotification = false ) : TRpcClient |
return |
TRpcClient |
instance |
createStreamContext()
protected method
Creates a stream context resource
getIsNotification()
public method
getServerUrl()
public method
setIsNotification()
public method
setServerUrl()
public method