API Documentation

Zend/XmlRpc/Request.php

Show: inherited
Table of Contents

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.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Controller  

\Zend_XmlRpc_Request

Package: Zend\XmlRpc

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()}.

Children
\Zend_XmlRpc_Request_Http
\Zend_XmlRpc_Request_Stdin
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Version
$Id: Request.php 25032 2012-08-17 19:45:06Z matthew $  

Properties

Propertyprotectedstring  $_encoding= ''UTF-8''

Request character encoding

Default value'UTF-8'Details
Type
string
Propertyprotected\Zend_XmlRpc_Fault  $_fault= 'null'

Fault object, if any

Default valuenullDetails
Type
\Zend_XmlRpc_Fault
Propertyprotectedstring  $_method= ''

Method to call

Details
Type
string
Propertyprotectedarray  $_params= 'array()'

Method parameters

Default valuearray()Details
Type
array
Propertyprotectedarray  $_types= 'array()'

XML-RPC type for each param

Default valuearray()Details
Type
array
Propertyprotectedstring  $_xml= ''

XML request

Details
Type
string
Propertyprotectedarray  $_xmlRpcParams= 'array()'

XML-RPC request params

Default valuearray()Details
Type
array

Methods

methodpublic__construct( string $method = null, array $params = null ) : void

Create a new XML-RPC request

Parameters
Name Type Description
$method string

(optional)

$params array

(optional)

methodpublic__toString( ) : string

Return XML request

Returns
Type Description
string
methodprotected_getXmlRpcParams( ) : array

Retrieve method parameters as XMLRPC values

Returns
Type Description
array
methodpublicaddParam( 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

Parameters
Name Type Description
$value mixed
$type string

Optional; type hinting

methodpublicgetEncoding( ) : string

Retrieve current request encoding

Returns
Type Description
string
methodpublicgetFault( ) : null|\Zend_XmlRpc_Fault

Retrieve the fault response, if any

Returns
Type Description
null|\Zend_XmlRpc_Fault
methodpublicgetMethod( ) : string

Retrieve call method

Returns
Type Description
string
methodpublicgetParams( ) : array

Retrieve the array of parameters

Returns
Type Description
array
methodpublicgetTypes( ) : array

Return parameter types

Returns
Type Description
array
methodpublicisFault( ) : boolean

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

Returns
Type Description
boolean
methodpublicloadXml( string $request ) : boolean

Load XML and parse into request components

Parameters
Name Type Description
$request string
Returns
Type Description
boolean True on success, false if an error occurred.
methodpublicsaveXml( ) : string

Create XML request

Returns
Type Description
string
methodpublicsetEncoding( string $encoding ) : \Zend_XmlRpc_Request

Set encoding to use in request

Parameters
Name Type Description
$encoding string
Returns
Type Description
\Zend_XmlRpc_Request
methodpublicsetMethod( string $method ) : boolean

Set method to call

Parameters
Name Type Description
$method string
Returns
Type Description
boolean Returns true on success, false if method name is invalid
methodpublicsetParams( ) : 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
    )[, ... ]
);
Details
Access
public  
Documentation was generated by DocBlox 0.15.1.