PHP Класс 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();
Показать файл
Открыть проект
Открытые методы
Защищенные методы
Описание методов
__construct()
публичный Метод
public __construct ( $serverUrl, $isNotification = false ) |
create()
публичный статический Метод
Creates an instance of the requested RPC client type
public static create ( $type, $serverUrl, $isNotification = false ) : TRpcClient |
Результат |
TRpcClient |
instance |
createStreamContext()
защищенный Метод
Creates a stream context resource
getIsNotification()
публичный Метод
getServerUrl()
публичный Метод
setIsNotification()
публичный Метод
setServerUrl()
публичный Метод