HTTP response

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

package Default
inherited_from \Zend\XmlRpc\Response

 Methods

Constructor

__construct(mixed $return = null, string $type = null
Inherited

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

Parameters

$return

mixed

$type

string

Override __toString() to send HTTP Content-Type header

__toString() : string
inherited_from \Zend\XmlRpc\Response::__toString()

Returns

string

Return XML response

__toString() : string
Inherited

Returns

string

Retrieve current response encoding

getEncoding() : string
Inherited

Returns

string

Returns the fault, if any.

getFault() : null | \Zend\XmlRpc\Fault
Inherited

Returns

null\Zend\XmlRpc\Fault

Retrieve the return value

getReturnValue() : mixed
Inherited

Returns

mixed

Is the response a fault response?

isFault() : boolean
Inherited

Returns

boolean

Load a response from an XML response

loadXml(string $response) : boolean
Inherited

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

Parameters

$response

string

Exceptions

\Zend\XmlRpc\Exception\ValueException if invalid XML

Returns

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

Return response as XML

saveXml() : string
Inherited

Returns

string

Set encoding to use in response

setEncoding(string $encoding) : \Zend\XmlRpc\Response
Inherited

Parameters

$encoding

string

Returns

\Zend\XmlRpc\Response

Set the return value

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

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\AbstractValue
Inherited

Returns

\Zend\XmlRpc\AbstractValue

 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