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
Afficher le fichier Open project: pradosoft/prado

Méthodes publiques

Méthode 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 méthode

Constructor
public __construct ( )

__destruct() public méthode

Destructor
public __destruct ( )

addMethod() public méthode

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

callMethod() public méthode

Handles the RPC request
public callMethod ( string $requestPayload ) : string
$requestPayload string
Résultat string XML RPC response

createErrorResponse() public méthode

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

createResponseHeaders() public méthode

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

decode() public méthode

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

encode() public méthode

Encodes PHP data into XML data
public encode ( $data ) : string
Résultat string XML encoded PHP data