Zend Framework  3.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Response Class Reference

XmlRpc Response. More...

Public Member Functions

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

Protected Member Functions

 getXmlRpcReturn ()
 Retrieve the XMLRPC value for the return value.
 

Protected Attributes

 $return
 
 $type
 
 $encoding = 'UTF-8'
 
 $fault = null
 

Detailed Description

XmlRpc Response.

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

Constructor & Destructor Documentation

__construct (   $return = null,
  $type = null 
)

Constructor.

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

Parameters
mixed$return
string$type

Member Function Documentation

__toString ( )

Return XML response.

Returns
string
getEncoding ( )

Retrieve current response encoding.

Returns
string
getFault ( )

Returns the fault, if any.

Returns
null|
getReturnValue ( )

Retrieve the return value.

Returns
mixed
getXmlRpcReturn ( )
protected

Retrieve the XMLRPC value for the return value.

Returns
isFault ( )

Is the response a fault response?

Returns
bool
loadXml (   $response)

Load a response from an XML response.

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

Parameters
string$response
Exceptions
Exception\ValueExceptionif invalid XML
Returns
bool True if a valid XMLRPC response, false if a fault response or invalid input
saveXml ( )

Return response as XML.

Returns
string
setEncoding (   $encoding)

Set encoding to use in response.

Parameters
string$encoding
Returns
setReturnValue (   $value,
  $type = null 
)

Set the return value.

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

Parameters
mixed$value
string$type
Returns
void

Member Data Documentation

$encoding = 'UTF-8'
protected
$fault = null
protected
$return
protected
$type
protected