PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TJsonRpcClient

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);
TComponent
Extended by TApplicationComponent
Extended by TRpcClient
Extended by TJsonRpcClient
Package: System\Util
Copyright: 2010 Bigpoint GmbH
License: http://www.pradosoft.com/license/
Author: Robin J. Rogge <rrogge@bigpoint.net>
Version: $Id$
Since: 3.2
Located at Util/TRpcClient.php
Methods summary
public mixed
# __call( string $method, array $parameters )

Parameters

$method
string
RPC method name
$parameters
array
RPC method parameters

Returns

mixed
RPC request result

Throws

TRpcClientRequestException
if the client fails to connect to the server
TRpcClientResponseException
if the response represents an RPC fault

Overrides

TComponent::__call()
public
# encodeRequest( string $method, array $parameters )

Parameters

$method
string
method name
$parameters
array
method parameters
public static TRpcClient
# create( string $type, boolean $serverUrl, mixed $isNotification = false )

Creates an instance of TJsonRpcClient

Creates an instance of TJsonRpcClient

Parameters

$type
string
url of the rpc server
$serverUrl
boolean
whether the requests are considered to be notifications (completely ignoring the response) (default: false)
$isNotification

Returns

TRpcClient
instance

Throws

TApplicationException
if an unsupported RPC client type was specified

Overrides

TRpcClient::create()
Methods inherited from TRpcClient
__construct(), createStreamContext(), getIsNotification(), getServerUrl(), performRequest(), setIsNotification(), setServerUrl()
Methods inherited from TApplicationComponent
getApplication(), getRequest(), getResponse(), getService(), getSession(), getUser(), publishAsset(), publishFilePath()
Methods inherited from TComponent
__destruct(), __get(), __isset(), __set(), __sleep(), __unset(), __wakeup(), addParsedObject(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO