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

package Default
inherited_from \Zend\XmlRpc\Value\AbstractScalar

 Methods

Set the value of a boolean native type We hold the boolean type as an integer (0 or 1)

__construct(boolean $value) 

Parameters

$value

boolean

Generate XML code that represent a native XML/RPC value

generateXml() : void
Inherited

Get XML generator instance

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

Returns

\Zend\XmlRpc\Generator\GeneratorInterface

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

getType() : string
Inherited

Returns

string

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

getValue() : boolean

Returns

boolean

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

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. 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)

getXmlRpcValue(mixed $value, \Zend\XmlRpc\Zend\XmlRpc\Value::constant $type = self::AUTO_DETECT_TYPE) : \Zend\XmlRpc\AbstractValue
InheritedStatic

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

Parameters

$value

mixed

$type

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

Exceptions

\Zend\XmlRpc\Exception\ValueException

Returns

\Zend\XmlRpc\AbstractValue

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(null|\Zend\XmlRpc\Generator\GeneratorInterface $generator = null) : void
InheritedStatic

Parameters

$generator

null\Zend\XmlRpc\Generator\GeneratorInterface

_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 a scalar native MXL-RPC value

_generateXml() : void
Inherited

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

_phpVarToNativeXmlRpc(mixed $value) : \Zend\XmlRpc\AbstractValue
InheritedStatic
static

Parameters

$value

mixed

The PHP variable for conversion

Exceptions

\Zend\XmlRpc\Exception\InvalidArgumentException

Returns

\Zend\XmlRpc\AbstractValue

_setXML()

_setXML($xml) : void
Inherited

Parameters

$xml

Transform an XML string into a XML-RPC native value

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

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

\Zend\XmlRpc\AbstractValue

 Properties

 

$generator

$generator : \Zend\XmlRpc\Generator\GeneratorInterface

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 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'