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()}.
string $_encoding = 'UTF-8'Request character encoding
DetailsZend_XmlRpc_Fault $_fault = 'null'Fault object, if any
Detailsstring $_method = ''Method to call
Detailsarray $_params = 'array'Method parameters
Detailsarray $_types = 'array'XML-RPC type for each param
Detailsstring $_xml = ''XML request
Detailsarray $_xmlRpcParams = 'array'XML-RPC request params
Details__construct(
string $method
=
null, array $params
=
null
)
:
Create a new XML-RPC request
Details__toString(
)
:
stringReturn XML request
Details_getXmlRpcParams(
)
:
arrayRetrieve method parameters as XMLRPC values
DetailsaddParam(
mixed $value, string $type
=
null
)
:
voidAdd a parameter to the parameter stack
Adds a parameter to the parameter stack, associating it with the type $type if provided
DetailsgetEncoding(
)
:
stringRetrieve current request encoding
DetailsgetFault(
)
:
null|Zend_XmlRpc_FaultRetrieve the fault response, if any
DetailsgetMethod(
)
:
stringRetrieve call method
DetailsgetParams(
)
:
arrayRetrieve the array of parameters
DetailsgetTypes(
)
:
arrayReturn parameter types
DetailsisFault(
)
:
booleanDoes the current request contain errors and should it return a fault response?
DetailsloadXml(
string $request
)
:
booleanLoad XML and parse into request components
DetailssaveXml(
)
:
stringCreate XML request
DetailssetEncoding(
string $encoding
)
:
Zend_XmlRpc_RequestSet encoding to use in request
DetailssetMethod(
string $method
)
:
booleanSet method to call
DetailssetParams(
)
:
voidSet 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
)[, ... ]
);
Details