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 TRpcProtocol

TRpcProtocol class

TRpcProtocol is the base class used to implement a protocol in a TRpcService. Prado already implements two protocols: TXmlRpcProtocol for Xml-Rpc request and TJsonRpcProtocol for JSON-Rpc requests.

Direct known subclasses

TJsonRpcProtocol, TXmlRpcProtocol
Abstract
Package: System\Web\Services
Copyright: 2010 Bigpoint GmbH
License: http://www.pradosoft.com/license/
Author: Robin J. Rogge <rrogge@bigpoint.net>
Version: $Id$
Since: 3.2
Located at Web/Services/TRpcService.php
Methods summary
abstract public processed
# callMethod( string $requestPayload )

Parameters

$requestPayload
string
request payload Processed the request ans returns the response, if any

Returns

processed
response
abstract public a
# createErrorResponse( TRpcException $exception )

Parameters

$exception
TRpcException
the exception with error details Creates a proper response for an error condition

Returns

a
response representing the error
abstract public
# createResponseHeaders( response $response )

Parameters

$response
response
Sets the needed headers for the response (eg: content-type, charset)
abstract public string
# encode( mixed $data )

Encodes the response

Encodes the response

Parameters

$data
mixed
reponse data

Returns

string
encoded response
abstract public mixed
# decode( string $data )

Decodes the request payload

Decodes the request payload

Parameters

$data
string
request payload

Returns

mixed
decoded request
public
# addMethod( string $methodName, array $handlerDetails )

Registers a new RPC method and handler details

Registers a new RPC method and handler details

Parameters

$methodName
string
$methodName
$handlerDetails
array
$handlerDetails containing the callback handler
public mixed
# callApiMethod( string $methodName, array $parameters )

Calls the callback handler for the given method

Calls the callback handler for the given method

Parameters

$methodName
string
$methodName of the RPC
$parameters
array
$parameters for the callback handler as provided by the client

Returns

mixed
whatever the callback handler returns
Properties summary
protected array $rpcMethods array()
#

containing the mapping from RPC method names to the actual handlers

containing the mapping from RPC method names to the actual handlers

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