API Documentation

XmlRpc/Request.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Controller
Classes
Zend_XmlRpc_Request

Description

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.

Zend_XmlRpc_Request

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_XmlRpc
version
$Id: Request.php 20208 2010-01-11 22:37:37Z lars $
Properties
$_encoding
$_method
$_xml
$_params
$_fault
$_types
$_xmlRpcParams
Methods
__construct
setEncoding
getEncoding
setMethod
getMethod
addParam
setParams
getParams
getTypes
loadXml
isFault
getFault
_getXmlRpcParams
saveXml
__toString

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 {@link $_fault}; developers may check for it using {@link isFault()} and {@link getFault()}.

Properties

$_encoding

string $_encoding = 'UTF-8'

Request character encoding

Details

$_encoding
string
visibility
protected
default
UTF-8
final
false
static
false

$_fault

Zend_XmlRpc_Fault $_fault = 'null'

Fault object, if any

Details

$_fault
Zend_XmlRpc_Fault
visibility
protected
default
null
final
false
static
false

$_method

string $_method = ''

Method to call

Details

$_method
string
visibility
protected
default
final
false
static
false

$_params

array $_params = 'array'

Method parameters

Details

$_params
array
visibility
protected
default
array
final
false
static
false

$_types

array $_types = 'array'

XML-RPC type for each param

Details

$_types
array
visibility
protected
default
array
final
false
static
false

$_xml

string $_xml = ''

XML request

Details

$_xml
string
visibility
protected
default
final
false
static
false

$_xmlRpcParams

array $_xmlRpcParams = 'array'

XML-RPC request params

Details

$_xmlRpcParams
array
visibility
protected
default
array
final
false
static
false

Methods

__construct

__construct( string $method = null, array $params = null ) :

Create a new XML-RPC request

Arguments
$method
string
(optional)
$params
array
(optional)
Details
visibility
public
final
false
static
false

__toString

__toString( ) : string

Return XML request

Output
string
Details
visibility
public
final
false
static
false

_getXmlRpcParams

_getXmlRpcParams( ) : array

Retrieve method parameters as XMLRPC values

Output
array
Details
visibility
protected
final
false
static
false

addParam

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

Arguments
$value
mixed
$type
string
Optional; type hinting
Details
visibility
public
final
false
static
false

getEncoding

getEncoding( ) : string

Retrieve current request encoding

Output
string
Details
visibility
public
final
false
static
false

getFault

getFault( ) : null|Zend_XmlRpc_Fault

Retrieve the fault response, if any

Output
null|Zend_XmlRpc_Fault
Details
visibility
public
final
false
static
false

getMethod

getMethod( ) : string

Retrieve call method

Output
string
Details
visibility
public
final
false
static
false

getParams

getParams( ) : array

Retrieve the array of parameters

Output
array
Details
visibility
public
final
false
static
false

getTypes

getTypes( ) : array

Return parameter types

Output
array
Details
visibility
public
final
false
static
false

isFault

isFault( ) : boolean

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

Output
boolean
Details
visibility
public
final
false
static
false

loadXml

loadXml( string $request ) : boolean

Load XML and parse into request components

Arguments
$request
string
Output
boolean
True on success, false if an error occurred.
Details
visibility
public
final
false
static
false

saveXml

saveXml( ) : string

Create XML request

Output
string
Details
visibility
public
final
false
static
false

setEncoding

setEncoding( string $encoding ) : Zend_XmlRpc_Request

Set encoding to use in request

Arguments
$encoding
string
Details
visibility
public
final
false
static
false

setMethod

setMethod( string $method ) : boolean

Set method to call

Arguments
$method
string
Output
boolean
Returns true on success, false if method name is invalid
Details
visibility
public
final
false
static
false

setParams

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 )[, ... ] );

Details
visibility
public
final
false
static
false
access
public
Documentation was generated by DocBlox.