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

category Zend
package Zend_XmlRpc
subpackage Value
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_XmlRpc_Value_Collection

 Methods

Set the value of an array native type

__construct(array $value) 
inherited_from \Zend_XmlRpc_Value_Collection::__construct()

Parameters

$value

array

Set the value of a collection type (array and struct) native types

__construct(array $value) 
Inherited

Parameters

$value

array

Generate XML code that represent a native XML/RPC value

generateXml() : void
Inherited

Get XML generator instance

getGenerator() : \Zend_XmlRpc_Generator_GeneratorAbstract
InheritedStatic

Returns

\Zend_XmlRpc_Generator_GeneratorAbstract

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

getType() : string
Inherited

Returns

string

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

getValue() : mixed
Inherited

Returns

mixed

Get XML-RPC type for a PHP native variable

getXmlRpcTypeByValue(mixed $value) : string
InheritedStatic
static

Parameters

$value

mixed

Returns

string

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)

getXmlRpcValue(mixed $value, \Zend_XmlRpc_Value::constant $type = self::AUTO_DETECT_TYPE) : \Zend_XmlRpc_Value
InheritedStatic

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

static

Parameters

$value

mixed

$type

\Zend_XmlRpc_Value::constant

Returns

\Zend_XmlRpc_Value

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

saveXml() : string
Inherited

Returns

string

Changes the encoding of the generator

setEncoding(string $encoding) : void
InheritedStatic

Parameters

$encoding

string

Sets XML generator instance

setGenerator(\Zend_XmlRpc_Generator_GeneratorAbstract $generator) : void
InheritedStatic

Parameters

$generator

\Zend_XmlRpc_Generator_GeneratorAbstract

_createSimpleXMLElement()

_createSimpleXMLElement($xml) 
InheritedStatic

Parameters

$xml

Extract XML/RPC type and value from SimpleXMLElement object

_extractTypeAndValue(\SimpleXMLElement $xml, $type, $value) : void
InheritedStatic

Parameters

$xml

\SimpleXMLElement

$type

$value

Generate the XML code that represent an array native MXL-RPC value

_generateXml() : void

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

_phpVarToNativeXmlRpc(mixed $value) : \Zend_XmlRpc_Value
InheritedStatic
static

Parameters

$value

mixed

The PHP variable for convertion

Returns

\Zend_XmlRpc_Value

_setXML()

_setXML(string $xml) : void
Inherited

Parameters

$xml

string

Transform an XML string into a XML-RPC native value

_xmlStringToNativeXmlRpc(string|\SimpleXMLElement $xml) : \Zend_XmlRpc_Value
InheritedStatic
static

Parameters

$xml

string\SimpleXMLElement

A SimpleXMLElement object represent the XML string It can be also a valid XML string for convertion

Returns

\Zend_XmlRpc_Value

 Properties

 

$_generator

$_generator : \Zend_XmlRpc_Generator_GeneratorAbstract

Default

Static
 

The native XML-RPC type of this object One of the XMLRPC_TYPE_* constants

$_type 

Default

 

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

$_value 

Default

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

 

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

$_xml 

Default

 Constants

 

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

AUTO_DETECT_TYPE = 'auto_detect' 
 

XMLRPC_TYPE_APACHEI8

XMLRPC_TYPE_APACHEI8 = 'ex:i8' 
 

XMLRPC_TYPE_APACHENIL

XMLRPC_TYPE_APACHENIL = 'ex:nil' 
 

XMLRPC_TYPE_ARRAY

XMLRPC_TYPE_ARRAY = 'array' 
 

XMLRPC_TYPE_BASE64

XMLRPC_TYPE_BASE64 = 'base64' 
 

XMLRPC_TYPE_BOOLEAN

XMLRPC_TYPE_BOOLEAN = 'boolean' 
 

XMLRPC_TYPE_DATETIME

XMLRPC_TYPE_DATETIME = 'dateTime.iso8601' 
 

XMLRPC_TYPE_DOUBLE

XMLRPC_TYPE_DOUBLE = 'double' 
 

All the XML-RPC native types

XMLRPC_TYPE_I4 = 'i4' 
 

XMLRPC_TYPE_I8

XMLRPC_TYPE_I8 = 'i8' 
 

XMLRPC_TYPE_INTEGER

XMLRPC_TYPE_INTEGER = 'int' 
 

XMLRPC_TYPE_NIL

XMLRPC_TYPE_NIL = 'nil' 
 

XMLRPC_TYPE_STRING

XMLRPC_TYPE_STRING = 'string' 
 

XMLRPC_TYPE_STRUCT

XMLRPC_TYPE_STRUCT = 'struct' 
 

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

XML_STRING = 'xml'