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();
Afficher le fichier
Open project: pradosoft/prado
Méthodes publiques
Méthodes protégées
Method Details
__construct()
public méthode
public __construct ( $serverUrl, $isNotification = false ) |
create()
public static méthode
Creates an instance of the requested RPC client type
public static create ( $type, $serverUrl, $isNotification = false ) : TRpcClient |
Résultat |
TRpcClient |
instance |
createStreamContext()
protected méthode
Creates a stream context resource
getIsNotification()
public méthode
getServerUrl()
public méthode
setIsNotification()
public méthode
setServerUrl()
public méthode