Zend Framework
3.0
|
XmlRpc Request object. More...
Public Member Functions | |
__construct ($method=null, $params=null) | |
Create a new XML-RPC request. | |
setEncoding ($encoding) | |
Set encoding to use in request. | |
getEncoding () | |
Retrieve current request encoding. | |
setMethod ($method) | |
Set method to call. | |
getMethod () | |
Retrieve call method. | |
addParam ($value, $type=null) | |
Add a parameter to the parameter stack. | |
setParams () | |
Set the parameters array. | |
getParams () | |
Retrieve the array of parameters. | |
getTypes () | |
Return parameter types. | |
loadXml ($request) | |
Load XML and parse into request components. | |
isFault () | |
Does the current request contain errors and should it return a fault response? | |
getFault () | |
Retrieve the fault response, if any. | |
saveXml () | |
Create XML request. | |
__toString () | |
Return XML request. | |
Protected Member Functions | |
getXmlRpcParams () | |
Retrieve method parameters as XMLRPC values. | |
Protected Attributes | |
$encoding = 'UTF-8' | |
$method | |
$xml | |
$params = [] | |
$fault = null | |
$types = [] | |
$xmlRpcParams = [] | |
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().
__construct | ( | $method = null , |
|
$params = null |
|||
) |
Create a new XML-RPC request.
string | $method | (optional) |
array | $params | (optional) |
__toString | ( | ) |
Return XML request.
addParam | ( | $value, | |
$type = null |
|||
) |
Add a parameter to the parameter stack.
Adds a parameter to the parameter stack, associating it with the type $type if provided
mixed | $value | |
string | $type | Optional; type hinting |
getEncoding | ( | ) |
Retrieve current request encoding.
getFault | ( | ) |
Retrieve the fault response, if any.
getMethod | ( | ) |
Retrieve call method.
getParams | ( | ) |
Retrieve the array of parameters.
getTypes | ( | ) |
Return parameter types.
|
protected |
Retrieve method parameters as XMLRPC values.
isFault | ( | ) |
Does the current request contain errors and should it return a fault response?
loadXml | ( | $request | ) |
Load XML and parse into request components.
string | $request |
Exception\ValueException | if invalid XML |
saveXml | ( | ) |
Create XML request.
setEncoding | ( | $encoding | ) |
Set encoding to use in request.
string | $encoding |
setMethod | ( | $method | ) |
Set method to call.
string | $method |
setParams | ( | ) |
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 )[, ... ] );
public
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |