XRL  latest
Simple XML-RPC Library (both client and server)
fpoirotte\XRL\Response Class Reference

This class represents the response to an XML-RPC request. More...

+ Inheritance diagram for fpoirotte\XRL\Response:

Public Member Functions

 __construct ($xmlResult)
 
 __toString ()
 
 publish ()
 

Protected Member Functions

 addHeader ($header)
 
 finalize ($result)
 

Protected Attributes

 $result
 The response to an XML-RPC request, as serialized XML.
 

Detailed Description

This class represents the response to an XML-RPC request.

Authors
François Poirotte click.nosp@m.y@er.nosp@m.ebot..nosp@m.net

Definition at line 21 of file Response.php.

Constructor & Destructor Documentation

fpoirotte\XRL\Response::__construct (   $xmlResult)

Create the response to an XML-RPC request.

Parameters
mixed$xmlResultThe result of the request as a string, encoded using XML-RPC types.

Definition at line 33 of file Response.php.

Member Function Documentation

fpoirotte\XRL\Response::__toString ( )

Return the XML-RPC response this object represents, as serialized XML.

Return values
stringThis XML-RPC response, as serialized XML.

Implements fpoirotte\XRL\ResponseInterface.

Definition at line 43 of file Response.php.

References fpoirotte\XRL\Response\$result.

fpoirotte\XRL\Response::addHeader (   $header)
protected

Adds an HTTP header to the current response.

Parameters
string$headerHeader to add.
Return values
fpoirotte::XRL::ResponseInterfaceReturns this response.

Definition at line 59 of file Response.php.

Referenced by fpoirotte\XRL\Response\publish().

fpoirotte\XRL\Response::finalize (   $result)
protected

A function that echoes its input and exits.

Parameters
string$resultSome string to echo before exiting.

Definition at line 73 of file Response.php.

References fpoirotte\XRL\Response\$result.

fpoirotte\XRL\Response::publish ( )

Publish this XML-RPC response to a browser.

This method sets the proper HTTP headers and then sends the XML-RPC response to a browser.

Warning
This method never returns.

Implements fpoirotte\XRL\ResponseInterface.

Definition at line 79 of file Response.php.

References fpoirotte\XRL\Response\$result, and fpoirotte\XRL\Response\addHeader().


The documentation for this class was generated from the following file: