Abstract Class 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

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

Located in /XmlRpc/Value.php (line 37)


	
			
Direct descendents
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_NIL = 'nil'
 XMLRPC_TYPE_STRING = 'string'
 XMLRPC_TYPE_STRUCT = 'struct'
 XML_STRING = 'xml'
Variable Summary
Method Summary
 static Zend_XmlRpc_Value getXmlRpcValue (mixed $value, [Zend_XmlRpc_Value::constant $type = self::AUTO_DETECT_TYPE])
 static void setEncoding (string $encoding)
 static void _createSimpleXMLElement ( &$xml)
 static void _extractTypeAndValue ( $xml, string &$type, string &$value)
 static Zend_XmlRpc_Value _phpVarToNativeXmlRpc (mixed $value)
 static Zend_XmlRpc_Value _xmlStringToNativeXmlRpc (string|SimpleXMLElement $xml)
 void generateXml ()
 string getType ()
 mixed getValue ()
 string saveXml ()
 void _setXML ($xml $xml)
Variables
static Zend_XmlRpc_Generator_GeneratorAbstract $_generator (line 61)
  • access: protected
mixed $_type (line 51)

The native XML-RPC type of this object

One of the XMLRPC_TYPE_* constants

  • access: protected
mixed $_value (line 45)

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
mixed $_xml (line 56)

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

  • access: protected
Methods
static getGenerator (line 105)

Get XML generator instance

  • access: public
static getXmlRpcValue (line 192)

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 ($type is set to Zend_XmlRpc_Value::XML_STRING)
By default the value type is autodetected according to it's PHP type

  • access: public
static Zend_XmlRpc_Value getXmlRpcValue (mixed $value, [Zend_XmlRpc_Value::constant $type = self::AUTO_DETECT_TYPE])
  • mixed $value
  • Zend_XmlRpc_Value::constant $type
static setEncoding (line 137)

Changes the encoding of the generator

  • access: public
static void setEncoding (string $encoding)
  • string $encoding
static setGenerator (line 126)

Sets XML generator instance

  • access: public
static void setGenerator (Zend_XmlRpc_Generator_GeneratorAbstract $generator)
static _createSimpleXMLElement (line 431)
  • access: protected
static void _createSimpleXMLElement ( &$xml)
  • &$xml
static _extractTypeAndValue (line 454)

Extract XML/RPC type and value from SimpleXMLElement object

  • access: protected
static void _extractTypeAndValue ( $xml, string &$type, string &$value)
  • SimpleXMLElement $xml
  • string &$type: Type bind variable
  • string &$value: Value bind variable
static _phpVarToNativeXmlRpc (line 264)

Transform a PHP native variable into a XML-RPC native value

  • access: protected
static Zend_XmlRpc_Value _phpVarToNativeXmlRpc (mixed $value)
  • mixed $value: The PHP variable for convertion
static _xmlStringToNativeXmlRpc (line 334)

Transform an XML string into a XML-RPC native value

  • access: protected
static Zend_XmlRpc_Value _xmlStringToNativeXmlRpc (string|SimpleXMLElement $xml)
  • string|SimpleXMLElement $xml: A SimpleXMLElement object represent the XML string It can be also a valid XML string for convertion
generateXml (line 171)

Generate XML code that represent a native XML/RPC value

  • access: public
void generateXml ()
getType (line 95)

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

  • access: public
string getType ()
getValue (line 149)

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

  • abstract:
  • access: public
mixed getValue ()

Redefined in descendants as:
saveXml (line 157)

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

  • access: public
string saveXml ()
_setXML (line 480)
  • access: protected
void _setXML ($xml $xml)
  • $xml $xml
Class Constants
AUTO_DETECT_TYPE = 'auto_detect' (line 66)

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

XMLRPC_TYPE_APACHEI8 = 'ex:i8' (line 79)
XMLRPC_TYPE_APACHENIL = 'ex:nil' (line 88)
XMLRPC_TYPE_ARRAY = 'array' (line 85)
XMLRPC_TYPE_BASE64 = 'base64' (line 84)
XMLRPC_TYPE_BOOLEAN = 'boolean' (line 81)
XMLRPC_TYPE_DATETIME = 'dateTime.iso8601' (line 83)
XMLRPC_TYPE_DOUBLE = 'double' (line 80)
XMLRPC_TYPE_I4 = 'i4' (line 76)

All the XML-RPC native types

XMLRPC_TYPE_I8 = 'i8' (line 78)
XMLRPC_TYPE_INTEGER = 'int' (line 77)
XMLRPC_TYPE_NIL = 'nil' (line 87)
XMLRPC_TYPE_STRING = 'string' (line 82)
XMLRPC_TYPE_STRUCT = 'struct' (line 86)
XML_STRING = 'xml' (line 71)

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

Documentation generated on Mon, 21 Jun 2010 15:51:31 -0400 by phpDocumentor 1.4.3