PHP Class Prado\Web\Services\TXmlRpcProtocol

TXmlRpcProtocol is a class that implements XML-Rpc protocol in {@link TRpcService}. It's basically a wrapper to the xmlrpc_server_* family of php methods.
Since: 3.2
Author: Robin J. Rogge ([email protected])
Inheritance: extends TRpcProtocol
Datei anzeigen Open project: pradosoft/prado

Public Methods

Method Description
__construct ( ) Constructor
__destruct ( ) Destructor
addMethod ( string $methodName, $methodDetails ) Registers a new RPC method and handler details
callMethod ( string $requestPayload ) : string Handles the RPC request
createErrorResponse ( TRpcException $exception ) : string Turns the given exception into an XML RPC fault
createResponseHeaders ( THttpResponse $response ) Sets the correct response headers
decode ( string $data ) : array Decodes XML encoded data into PHP data
encode ( $data ) : string Encodes PHP data into XML data

Method Details

__construct() public method

Constructor
public __construct ( )

__destruct() public method

Destructor
public __destruct ( )

addMethod() public method

Registers a new RPC method and handler details
public addMethod ( string $methodName, $methodDetails )
$methodName string

callMethod() public method

Handles the RPC request
public callMethod ( string $requestPayload ) : string
$requestPayload string
return string XML RPC response

createErrorResponse() public method

Turns the given exception into an XML RPC fault
public createErrorResponse ( TRpcException $exception ) : string
$exception TRpcException
return string XML RPC fault

createResponseHeaders() public method

Sets the correct response headers
public createResponseHeaders ( THttpResponse $response )
$response THttpResponse

decode() public method

Decodes XML encoded data into PHP data
public decode ( string $data ) : array
$data string in XML format
return array PHP data

encode() public method

Encodes PHP data into XML data
public encode ( $data ) : string
return string XML encoded PHP data