2095. Class

2095.1. Zend\XmlRpc\AbstractValue

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

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

Using this function, users/ZendXmlRpcClient object can create the ZendXmlRpcValue objects from PHP variables, XML string or by specifying the exact XML-RPC natvie type

2095.1.1. Methods

2095.1.1.1. getType

getType()

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

Return type:string

2095.1.1.2. getGenerator

getGenerator()

Get XML generator instance

Return type:ZendXmlRpcGeneratorGeneratorInterface

2095.1.1.3. setGenerator

setGenerator()

Sets XML generator instance

Parameters:null|GeneratorGeneratorInterface
Return type:void

2095.1.1.4. setEncoding

setEncoding()

Changes the encoding of the generator

Parameters:string
Return type:void

2095.1.1.5. getValue

getValue()

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

Return type:mixed

2095.1.1.6. saveXml

saveXml()

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

Return type:string

2095.1.1.7. generateXml

generateXml()

Generate XML code that represent a native XML/RPC value

Return type:void

2095.1.1.8. getXmlRpcValue

getXmlRpcValue()

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)
  1. By specifying the native type ($type is one of the Value::XMLRPC_TYPE_* constants)
  2. From a XML string ($type is set to Value::XML_STRING)

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

Parameters:mixed

:param ZendXmlRpcValue::constant:

Throws ExceptionValueException:
 
Return type:AbstractValue

2095.1.1.9. getXmlRpcTypeByValue

getXmlRpcTypeByValue()

Get XML-RPC type for a PHP native variable

Parameters:mixed
Throws ExceptionInvalidArgumentException:
 
Return type:string

2095.1.1.10. _phpVarToNativeXmlRpc

_phpVarToNativeXmlRpc()

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

Parameters:mixed – The PHP variable for conversion
Throws ExceptionInvalidArgumentException:
 
Return type:AbstractValue
Static :

2095.1.1.11. _xmlStringToNativeXmlRpc

_xmlStringToNativeXmlRpc()

Transform an XML string into a XML-RPC native value

Parameters:string|SimpleXMLElement – A SimpleXMLElement object represent the XML string

It can be also a valid XML string for conversion

throws ExceptionValueException:
 
rtype:ZendXmlRpcAbstractValue
static:

2095.1.1.12. _createSimpleXMLElement

_createSimpleXMLElement()

2095.1.1.13. _extractTypeAndValue

_extractTypeAndValue()

Extract XML/RPC type and value from SimpleXMLElement object

Parameters:
  • SimpleXMLElement
  • string – Type bind variable
  • string – Value bind variable
Return type:

void

2095.1.1.14. _setXML

_setXML()

@param $xml

Return type:void

2095.1.2. Constants

2095.1.2.1. AUTO_DETECT_TYPE

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

2095.1.2.2. XML_STRING

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

2095.1.2.3. XMLRPC_TYPE_I4

All the XML-RPC native types

2095.1.2.4. XMLRPC_TYPE_INTEGER

2095.1.2.5. XMLRPC_TYPE_I8

2095.1.2.6. XMLRPC_TYPE_APACHEI8

2095.1.2.7. XMLRPC_TYPE_DOUBLE

2095.1.2.8. XMLRPC_TYPE_BOOLEAN

2095.1.2.9. XMLRPC_TYPE_STRING

2095.1.2.10. XMLRPC_TYPE_DATETIME

2095.1.2.11. XMLRPC_TYPE_BASE64

2095.1.2.12. XMLRPC_TYPE_ARRAY

2095.1.2.13. XMLRPC_TYPE_STRUCT

2095.1.2.14. XMLRPC_TYPE_NIL

2095.1.2.15. XMLRPC_TYPE_APACHENIL