XmlRpc Request object -- Request via HTTP

Extends Zend_XmlRpc_Request to accept a request via HTTP. Request is built at construction time using a raw POST; if no data is available, the request is declared a fault.

category Zend
package Zend_XmlRpc

 Methods

Constructor

__construct() 

Attempts to read from php://input to get raw POST request; if an error occurs in doing so, or if the XML is invalid, the request is declared a fault.

Return XML request

__toString() : string
Inherited

inherited_from \Zend\XmlRpc\Request::__toString()

Returns

string

Add a parameter to the parameter stack

addParam(mixed $value, string $type) : void
Inherited

Adds a parameter to the parameter stack, associating it with the type $type if provided

inherited_from \Zend\XmlRpc\Request::addParam()

Parameters

$value

mixed

$type

string

Optional; type hinting

Retrieve current request encoding

getEncoding() : string
Inherited

inherited_from \Zend\XmlRpc\Request::getEncoding()

Returns

string

Retrieve the fault response, if any

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

inherited_from \Zend\XmlRpc\Request::getFault()

Returns

Retrieve the full HTTP request, including headers and XML

getFullRequest() : string

Returns

string

Get headers

getHeaders() : array

Gets all headers as key => value pairs and returns them.

Returns

array

Retrieve call method

getMethod() : string
Inherited

inherited_from \Zend\XmlRpc\Request::getMethod()

Returns

string

Retrieve the array of parameters

getParams() : array
Inherited

inherited_from \Zend\XmlRpc\Request::getParams()

Returns

array

Retrieve the raw XML request

getRawRequest() : string

Returns

string

Return parameter types

getTypes() : array
Inherited

inherited_from \Zend\XmlRpc\Request::getTypes()

Returns

array

Does the current request contain errors and should it return a fault response?

isFault() : bool
Inherited

inherited_from \Zend\XmlRpc\Request::isFault()

Returns

bool

Load XML and parse into request components

loadXml(string $request) : bool
Inherited

inherited_from \Zend\XmlRpc\Request::loadXml()

Parameters

$request

string

Exceptions

\Zend\XmlRpc\Exception\ValueException if invalid XML

Returns

boolTrue on success, false if an error occurred.

Create XML request

saveXml() : string
Inherited

inherited_from \Zend\XmlRpc\Request::saveXml()

Returns

string

Set encoding to use in request

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

inherited_from \Zend\XmlRpc\Request::setEncoding()

Parameters

$encoding

string

Returns

Set method to call

setMethod(string $method) : bool
Inherited

inherited_from \Zend\XmlRpc\Request::setMethod()

Parameters

$method

string

Returns

boolReturns true on success, false if method name is invalid

Set the parameters array

setParams() : void
Inherited

If called with a single, array value, that array is used to set the parameters stack. If called with multiple values or a single non-array value, the arguments are used to set the parameters stack.

Best is to call with array of the format, in order to allow type hinting when creating the XMLRPC values for each parameter:

$array = array(
    array(
        'value' => $value,
        'type'  => $type
    )[, ... ]
);

access public
inherited_from \Zend\XmlRpc\Request::setParams()

Retrieve method parameters as XMLRPC values

_getXmlRpcParams() : array
Inherited

inherited_from \Zend\XmlRpc\Request::_getXmlRpcParams()

Returns

array

 Properties

 

Request character encoding

$encoding : string
Inherited

inherited_from \Zend\XmlRpc\Request::$$encoding
 

Fault object, if any

$fault : \Zend\XmlRpc\Fault
Inherited

inherited_from \Zend\XmlRpc\Request::$$fault
 

Array of headers

$headers : array

 

Method to call

$method : string
Inherited

inherited_from \Zend\XmlRpc\Request::$$method
 

Method parameters

$params : array
Inherited

inherited_from \Zend\XmlRpc\Request::$$params
 

XML-RPC type for each param

$types : array
Inherited

inherited_from \Zend\XmlRpc\Request::$$types
 

Raw XML as received via request

$xml : string

 

XML-RPC request params

$xmlRpcParams : array
Inherited

inherited_from \Zend\XmlRpc\Request::$$xmlRpcParams