## Zend_XmlRpc_Value

Description

Represent a native XML-RPC value entity, used as parameters for the methods called by the Zend_XmlRpc_Client object and as the return value for those calls.

This object as a very important static function Zend_XmlRpc_Value::getXmlRpcValue, this function acts likes a factory for the Zend_XmlRpc_Value objects

Using this function, users/Zend_XmlRpc_Client object can create the Zend_XmlRpc_Value objects from PHP variables, XML string or by specifing the exact XML-RPC natvie type

- abstract:
- license: New BSD License
- copyright: Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/XmlRpc/Value.php (line 74)

Direct descendents

Class | Description
--- | ---
Zend_XmlRpc_Value_Collection |
Zend_XmlRpc_Value_Scalar |

Class Constant Summary
AUTO_DETECT_TYPE = 'auto_detect'
XMLRPC_TYPE_ARRAY = 'array'
XMLRPC_TYPE_BASE64 = 'base64'
XMLRPC_TYPE_BOOLEAN = 'boolean'
XMLRPC_TYPE_DATETIME = 'dateTime.iso8601'
XMLRPC_TYPE_DOUBLE = 'double'
XMLRPC_TYPE_I4 = 'i4'
XMLRPC_TYPE_INTEGER = 'int'
XMLRPC_TYPE_STRING = 'string'
XMLRPC_TYPE_STRUCT = 'struct'
XML_STRING = 'xml'
Variable Summary
mixed $_as_xml
mixed $_type
mixed $_value
Method Summary
static Zend_XmlRpc_Value getXmlRpcValue (mixed $value, [ $type = self::AUTO_DETECT_TYPE], Zend_XmlRpc_Value::constant $type )
string getAsXML ()
string getType ()
mixed getValue ()
Variables
mixed $_as_xml (line 93)

XML code representation of this object (will be calculated only once)

- access: protected

mixed $_type (line 88)

The native XML-RPC type of this object

One of the XMLRPC_TYPE_* constants

- access: protected

mixed $_value (line 82)

The native XML-RPC representation of this object's value

If the native type of this object is array or struct, this will be an array of Zend_XmlRpc_Value objects

- access: protected

Methods
static getXmlRpcValue (line 162)

Creates a Zend_XmlRpc_Value* object, representing a native XML-RPC value

A XmlRpcValue object can be created in 3 ways:

1. Autodetecting the native type out of a PHP variable (if $type is not set or equal to Zend_XmlRpc_Value::AUTO_DETECT_TYPE)
2. By specifing the native type ($type is one of the Zend_XmlRpc_Value::XMLRPC_TYPE_* constants)
3. From a XML string or SimpleXMLElement object ($type is set to Zend_XmlRpc_Value::XML_STRING)

By default the value type is autodetected according to it's PHP type

- access: public

Zend_XmlRpc_Value getXmlRpcValue (mixed $value, [ $type = self::AUTO_DETECT_TYPE], Zend_XmlRpc_Value::constant $type )

- mixed $value
- Zend_XmlRpc_Value::constant $type
- $type

getAsXML (line 143)

Return the XML code that represent a native MXL-RPC value

- access: public
- abstract:

string getAsXML ()

Redefined in descendants as:

- Zend_XmlRpc_Value_Array::getAsXML() : Return the XML code that represent an array native MXL-RPC value
- Zend_XmlRpc_Value_Struct::getAsXML() : Return the XML code that represent struct native MXL-RPC value
- Zend_XmlRpc_Value_Scalar::getAsXML() : Return the XML code that represent a scalar native MXL-RPC value

getType (line 124)

Get the native XML-RPC type (the type is one of the Zend_XmlRpc_Value::XMLRPC_TYPE_* constants)

- access: public

string getType ()
getValue (line 135)

Return the value of this object, convert the XML-RPC native value into a PHP variable

- access: public
- abstract:

mixed getValue ()

Redefined in descendants as:

- Zend_XmlRpc_Value_Collection::getValue() : Return the value of this object, convert the XML-RPC native collection values into a PHP array
- Zend_XmlRpc_Value_Base64::getValue() : Return the value of this object, convert the XML-RPC native base64 value into a PHP string We return this value decoded (a normal string)
- Zend_XmlRpc_Value_Boolean::getValue() : Return the value of this object, convert the XML-RPC native boolean value into a PHP boolean
- Zend_XmlRpc_Value_DateTime::getValue() : Return the value of this object, convert the XML-RPC native dateTime value into a PHP integer (unix timestamp representation of the iso8601 date format)
- Zend_XmlRpc_Value_Double::getValue() : Return the value of this object, convert the XML-RPC native double value into a PHP float
- Zend_XmlRpc_Value_Integer::getValue() : Return the value of this object, convert the XML-RPC native integer value into a PHP integer
- Zend_XmlRpc_Value_String::getValue() : Return the value of this object, convert the XML-RPC native string value into a PHP string Decode all encoded risky XML entities back to normal characters

Class Constants
AUTO_DETECT_TYPE = 'auto_detect' (line 98)

Specify that the XML-RPC native type will be auto detected from a PHP variable type

XMLRPC_TYPE_ARRAY = 'array' (line 115)
XMLRPC_TYPE_BASE64 = 'base64' (line 114)
XMLRPC_TYPE_BOOLEAN = 'boolean' (line 111)
XMLRPC_TYPE_DATETIME = 'dateTime.iso8601' (line 113)
XMLRPC_TYPE_DOUBLE = 'double' (line 110)
XMLRPC_TYPE_I4 = 'i4' (line 108)

All the XML-RPC native types

XMLRPC_TYPE_INTEGER = 'int' (line 109)
XMLRPC_TYPE_STRING = 'string' (line 112)
XMLRPC_TYPE_STRUCT = 'struct' (line 116)
XML_STRING = 'xml' (line 103)

Specify that the XML-RPC value will be parsed out from a given XML code

Documentation generated on Tue, 11 Jul 2006 12:18:17 -0500 by phpDocumentor 1.3.0RC6