XmlRpc Response

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

category Zend
package Zend_XmlRpc
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
version $Id$

 Methods

Constructor

__construct(mixed $return = null, string $type = null) : void

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

Parameters

$return

mixed

$type

string

Return XML response

__toString() : string

Returns

string

Retrieve current response encoding

getEncoding() : string

Returns

string

Returns the fault, if any.

getFault() : null | \Zend_XmlRpc_Fault

Returns

null\Zend_XmlRpc_Fault

Retrieve the return value

getReturnValue() : mixed

Returns

mixed

Is the response a fault response?

isFault() : boolean

Returns

boolean

Load a response from an XML response

loadXml(string $response) : boolean

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

Parameters

$response

string

Returns

booleanTrue if a valid XMLRPC response, false if a fault response or invalid input

Return response as XML

saveXml() : string

Returns

string

Set encoding to use in response

setEncoding(string $encoding) : \Zend_XmlRpc_Response

Parameters

$encoding

string

Returns

\Zend_XmlRpc_Response

Set the return value

setReturnValue(mixed $value, string $type = null) : void

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

Parameters

$value

mixed

$type

string

Retrieve the XMLRPC value for the return value

_getXmlRpcReturn() : \Zend_XmlRpc_Value

Returns

\Zend_XmlRpc_Value

 Properties

 

Response character encoding

$_encoding : string

Default

'UTF-8'
 

Fault, if response is a fault response

$_fault : null | \Zend_XmlRpc_Fault

Default

null
 

Return value

$_return : mixed

Default

 

Return type

$_type : string

Default