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 specifying the exact XML-RPC native type

 Methods

Generate XML code that represent a native XML/RPC value

generateXml() : void
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::generateXml()

Get XML generator instance

getGenerator() : \Zend\XmlRpc\Generator\GeneratorInterface
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::getGenerator()

Returns

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

getType() : string
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::getType()

Returns

string

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

getValue() : mixed
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::getValue()

Returns

mixed

Get XML-RPC type for a PHP native variable

getXmlRpcTypeByValue(mixed $value) : string
Inherited

static
inherited_from \Zend\XmlRpc\AbstractValue::getXmlRpcTypeByValue()

Parameters

$value

mixed

Exceptions

\Zend\XmlRpc\Exception\InvalidArgumentException

Returns

string

Creates a Value* object, representing a native XML-RPC value A XmlRpcValue object can be created in 3 ways: 1.

getXmlRpcValue(mixed $value, \Zend\XmlRpc\Zend\XmlRpc\Value::constant $type) : \Zend\XmlRpc\AbstractValue
Inherited

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

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

inherited_from \Zend\XmlRpc\AbstractValue::getXmlRpcValue()

Parameters

$value

mixed

$type

\Zend\XmlRpc\Zend\XmlRpc\Value::constant

Exceptions

\Zend\XmlRpc\Exception\ValueException

Returns

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

saveXml() : string
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::saveXml()

Returns

string

Changes the encoding of the generator

setEncoding(string $encoding) : void
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::setEncoding()

Parameters

$encoding

string

Sets XML generator instance

setGenerator(\Zend\XmlRpc\Generator\GeneratorInterface $generator) : void
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::setGenerator()

Parameters

_createSimpleXMLElement()

_createSimpleXMLElement($xml) 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::_createSimpleXMLElement()

Parameters

$xml

Extract XML/RPC type and value from SimpleXMLElement object

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

inherited_from \Zend\XmlRpc\AbstractValue::_extractTypeAndValue()

Parameters

$type

string

&$type Type bind variable

$value

string

&$value Value bind variable

Generate the XML code that represent a scalar native MXL-RPC value

_generateXml() : void

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

_phpVarToNativeXmlRpc(mixed $value) : \Zend\XmlRpc\AbstractValue
Inherited

static
inherited_from \Zend\XmlRpc\AbstractValue::_phpVarToNativeXmlRpc()

Parameters

$value

mixed

The PHP variable for conversion

Exceptions

\Zend\XmlRpc\Exception\InvalidArgumentException

Returns

_setXML()

_setXML($xml) : void
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::_setXML()

Parameters

$xml

Transform an XML string into a XML-RPC native value

_xmlStringToNativeXmlRpc(string | \SimpleXMLElement $xml) : \Zend\XmlRpc\AbstractValue
Inherited

static
inherited_from \Zend\XmlRpc\AbstractValue::_xmlStringToNativeXmlRpc()

Parameters

$xml

string\SimpleXMLElement

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

Exceptions

\Zend\XmlRpc\Exception\ValueException

Returns

 Properties

 

$generator

$generator : \Zend\XmlRpc\Generator\GeneratorInterface
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::$$generator
 

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

$type 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::$$type
 

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

$value 
Inherited

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

inherited_from \Zend\XmlRpc\AbstractValue::$$value
 

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

$xml 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::$$xml

 Constants

 

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

AUTO_DETECT_TYPE 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::AUTO_DETECT_TYPE
 

XMLRPC_TYPE_APACHEI8

XMLRPC_TYPE_APACHEI8 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::XMLRPC_TYPE_APACHEI8
 

XMLRPC_TYPE_APACHENIL

XMLRPC_TYPE_APACHENIL 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::XMLRPC_TYPE_APACHENIL
 

XMLRPC_TYPE_ARRAY

XMLRPC_TYPE_ARRAY 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::XMLRPC_TYPE_ARRAY
 

XMLRPC_TYPE_BASE64

XMLRPC_TYPE_BASE64 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::XMLRPC_TYPE_BASE64
 

XMLRPC_TYPE_BOOLEAN

XMLRPC_TYPE_BOOLEAN 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::XMLRPC_TYPE_BOOLEAN
 

XMLRPC_TYPE_DATETIME

XMLRPC_TYPE_DATETIME 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::XMLRPC_TYPE_DATETIME
 

XMLRPC_TYPE_DOUBLE

XMLRPC_TYPE_DOUBLE 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::XMLRPC_TYPE_DOUBLE
 

All the XML-RPC native types

XMLRPC_TYPE_I4 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::XMLRPC_TYPE_I4
 

XMLRPC_TYPE_I8

XMLRPC_TYPE_I8 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::XMLRPC_TYPE_I8
 

XMLRPC_TYPE_INTEGER

XMLRPC_TYPE_INTEGER 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::XMLRPC_TYPE_INTEGER
 

XMLRPC_TYPE_NIL

XMLRPC_TYPE_NIL 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::XMLRPC_TYPE_NIL
 

XMLRPC_TYPE_STRING

XMLRPC_TYPE_STRING 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::XMLRPC_TYPE_STRING
 

XMLRPC_TYPE_STRUCT

XMLRPC_TYPE_STRUCT 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::XMLRPC_TYPE_STRUCT
 

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

XML_STRING 
Inherited

inherited_from \Zend\XmlRpc\AbstractValue::XML_STRING