Class TJsonRpcClient

Description

TJsonRpcClient class

Note: When using setIsNotification(true), *every* following request is also considered to be a notification until you use setIsNotification(false).

Usage:

 $_rpcClient = new TJsonRpcClient('http://host/server');
 $_result = $_rpcClient->remoteMethod($param, $otherParam);
 // or
 $_result = TJsonRpcClient::create('http://host/server')->remoteMethod($param, $otherParam);

Located in /Util/TRpcClient.php (line 229)

TComponent
   |
   --TApplicationComponent
      |
      --TRpcClient
         |
         --TJsonRpcClient
Method Summary
static void create (string $type, boolean $serverUrl, [ $isNotification = false])
void encodeRequest (string $method, array $parameters)
mixed __call (string $method, array $parameters)
Methods
static method create (line 283)

Creates an instance of TJsonRpcClient

  • access: public
static void create (string $type, boolean $serverUrl, [ $isNotification = false])
  • string $type: url of the rpc server
  • boolean $serverUrl: whether the requests are considered to be notifications (completely ignoring the response) (default: false)
  • $isNotification

Redefinition of:
TRpcClient::create()
Creates an instance of the requested RPC client type
encodeRequest (line 266)
  • access: public
void encodeRequest (string $method, array $parameters)
  • string $method: method name
  • array $parameters: method parameters
__call (line 240)
  • return: RPC request result
  • throws: TRpcClientResponseException if the response represents an RPC fault
  • throws: TRpcClientRequestException if the client fails to connect to the server
  • access: public
mixed __call (string $method, array $parameters)
  • string $method: RPC method name
  • array $parameters: RPC method parameters

Redefinition of:
TComponent::__call()
Calls a method.

Inherited Methods

Inherited From TRpcClient

TRpcClient::__construct()
TRpcClient::create()
TRpcClient::createStreamContext()
TRpcClient::getIsNotification()
TRpcClient::getServerUrl()
TRpcClient::performRequest()
TRpcClient::setIsNotification()
TRpcClient::setServerUrl()

Inherited From TApplicationComponent

TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()

Inherited From TComponent

TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__call()
TComponent::__get()
TComponent::__set()
TComponent::__sleep()
TComponent::__wakeup()

Documentation generated on Mon, 25 Jun 2012 14:39:06 +0200 by phpDocumentor 1.4.3