Docs For Class Zend_XmlRpc_Request

## Class Zend_XmlRpc_Request

Description

XmlRpc Request object

Encapsulates an XmlRpc request, holding the method call and all parameters. Provides accessors for these, as well as the ability to load from XML and to create the XML request string.

Additionally, if errors occur setting the method or parsing XML, a fault is generated and stored in $_fault; developers may check for it using isFault() and getFault().

- version: $Id: Request.php 1246 2006-10-11 18:42:06Z matthew $
- license: New BSD License
- copyright: Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/XmlRpc/Request.php (line 53)

Direct descendents

Class | Description
--- | ---
Zend_XmlRpc_Request_Stdin | XmlRpc Request object -- Request via STDIN
Zend_XmlRpc_Request_Http | XmlRpc Request object -- Request via HTTP

Variable Summary
Zend_XmlRpc_Fault $_fault
string $_method
array $_params
string $_xml
Method Summary
void addParam (mixed $value, [string $type = null])
null|Zend_XmlRpc_Fault getFault ()
string getMethod ()
array getParams ()
boolean isFault ()
boolean loadXml (string $request)
boolean setMethod (string $method)
void setParams ()
array _getXmlRpcParams ()
string __toString ()
Variables
Zend_XmlRpc_Fault $_fault = null (line 77)

Fault object, if any

- access: protected

string $_method (line 59)

Method to call

- access: protected

array $_params = array() (line 71)

Method parameters

- access: protected

string $_xml (line 65)

XML request

- access: protected

Redefined in descendants as:

- Zend_XmlRpc_Request_Stdin::$_xml : Raw XML as received via request
- Zend_XmlRpc_Request_Http::$_xml : Raw XML as received via request

Methods
addParam (line 116)

Add a parameter to the parameter stack

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

- access: public

void addParam (mixed $value, [string $type = null])

- mixed $value
- string $type: Optional; type hinting

getFault (line 265)

Retrieve the fault response, if any

- access: public

null|Zend_XmlRpc_Fault getFault ()
getMethod (line 101)

Retrieve call method

- access: public

string getMethod ()
getParams (line 188)

Retrieve the array of parameters

- access: public

array getParams ()
isFault (line 255)

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

- access: public

boolean isFault ()
loadXml (line 199)

Load XML and parse into request components

- return: True on success, false if an error occurred.
- access: public

boolean loadXml (string $request)

- string $request

setMethod (line 85)

Set method to call

- return: Returns true on success, false if method name is invalid
- access: public

boolean setMethod (string $method)

- string $method

setParams (line 143)

Set the parameters array

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:

1. $array = array(
2. array(
3. 'value' => $value,
4. 'type' => $type
5. )[, ... ]
6. );

- access: public

void setParams ()
_getXmlRpcParams (line 275)

Retrieve method parameters as XMLRPC values

- access: protected

array _getXmlRpcParams ()
__toString (line 293)

Create XML request

- access: public

string __toString ()

Documentation generated on Sun, 29 Oct 2006 21:28:01 -0600 by phpDocumentor 1.3.0RC6