PHP Class Prado\Web\Services\TRpcServer

TRpcServer is a class TRpcServer is the base class used to creare a server to be used in conjunction with {@link TRpcService}. The role of TRpcServer is to be an intermediate, moving data between the service and the provider. This base class should suit the most common needs, but can be sublassed for logging and debugging purposes, or to filter and modify the request/response on the fly.
Since: 3.2
Author: Robin J. Rogge ([email protected])
Inheritance: extends Prado\TModule
Mostra file Open project: pradosoft/prado

Protected Properties

Property Type Description
$handler instance

Public Methods

Method Description
__construct ( TRpcProtocol $protocolHandler ) Constructor
addRpcMethod ( string $methodName, array $methodDetails ) Registers the method in the protocol handler
getPayload ( ) : string Retrieves the request payload
processRequest ( ) : string Passes the request payload to the protocol handler and returns the result

Method Details

__construct() public method

Constructor
public __construct ( TRpcProtocol $protocolHandler )
$protocolHandler TRpcProtocol instance

addRpcMethod() public method

Registers the method in the protocol handler
public addRpcMethod ( string $methodName, array $methodDetails )
$methodName string
$methodDetails array

getPayload() public method

Retrieves the request payload
public getPayload ( ) : string
return string request payload

processRequest() public method

Passes the request payload to the protocol handler and returns the result
public processRequest ( ) : string
return string rpc response

Property Details

$handler protected_oe property

instance
protected $handler