Class Response

Summary

Fully Qualified Name: Zend\XmlRpc\Response

Description

XmlRpc Response

Container for accessing an XMLRPC return value and creating the XML response.

Methods

Name Description Defined By
__construct() Constructor Response
__toString() Return XML response Response
getEncoding() Retrieve current response encoding Response
getFault() Returns the fault, if any. Response
getReturnValue() Retrieve the return value Response
isFault() Is the response a fault response? Response
loadXml() Load a response from an XML response Response
saveXml() Return response as XML Response
setEncoding() Set encoding to use in response Response
setReturnValue() Set the return value Response

Method Details

__construct()

Constructor

Can optionally pass in the return value and type hinting; otherwise, the return value can be set via {@link setReturnValue()}.

Parameter Name Type Description
$return mixed
$type string

Returns:

__toString()

Return XML response

Returns: string

getEncoding()

Retrieve current response encoding

Returns: string

getFault()

Returns the fault, if any.

Returns: null|\Zend\XmlRpc\Fault

getReturnValue()

Retrieve the return value

Returns: mixed

isFault()

Is the response a fault response?

Returns: bool

loadXml()

Load a response from an XML response

Attempts to load a response from an XMLRPC response, autodetecting if it is a fault response.

Parameter Name Type Description
$response string

Returns: bool True if a valid XMLRPC response, false if a fault response or invalid input

saveXml()

Return response as XML

Returns: string

setEncoding()

Set encoding to use in response

Parameter Name Type Description
$encoding string

Returns: \Zend\XmlRpc\Response

setReturnValue()

Set the return value

Sets the return value, with optional type hinting if provided.

Parameter Name Type Description
$value mixed
$type string

Returns: void

Top