Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
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 {@link $_fault}; developers may check for it using {@link isFault()} and {@link getFault()}.

__construct(
string $method
=
null, array $params
=
null
)
:
void
Create a new XML-RPC request
Name | Type | Description |
---|---|---|
$method | string | (optional) |
$params | array | (optional) |

_getXmlRpcParams(
)
:
array
Retrieve method parameters as XMLRPC values
Type | Description |
---|---|
array |

addParam(
mixed $value, string $type
=
null
)
:
void
Add a parameter to the parameter stack
Adds a parameter to the parameter stack, associating it with the type $type if provided
Name | Type | Description |
---|---|---|
$value | mixed | |
$type | string | Optional; type hinting |

getFault(
)
:
null|\Zend_XmlRpc_Fault
Retrieve the fault response, if any
Type | Description |
---|---|
null|\Zend_XmlRpc_Fault |

isFault(
)
:
boolean
Does the current request contain errors and should it return a fault response?
Type | Description |
---|---|
boolean |

loadXml(
string $request
)
:
boolean
Load XML and parse into request components
Name | Type | Description |
---|---|---|
$request | string |
Type | Description |
---|---|
boolean | True on success, false if an error occurred. |

setMethod(
string $method
)
:
boolean
Set method to call
Name | Type | Description |
---|---|---|
$method | string |
Type | Description |
---|---|
boolean | Returns true on success, false if method name is invalid |

setParams(
)
:
void
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:
$array = array(
array(
'value' => $value,
'type' => $type
)[, ... ]
);