Zend Framework
2.4
|
Represent a native XML-RPC value entity, used as parameters for the methods called by the Zend object and as the return value for those calls. More...
Public Member Functions | |
getType () | |
Get the native XML-RPC type (the type is one of the Value::XMLRPC_TYPE_* constants) | |
getValue () | |
Return the value of this object, convert the XML-RPC native value into a PHP variable. | |
saveXml () | |
Return the XML code that represent a native MXL-RPC value. | |
generateXml () | |
Generate XML code that represent a native XML/RPC value. | |
Static Public Member Functions | |
static | getGenerator () |
Get XML generator instance. | |
static | setGenerator (Generator\GeneratorInterface $generator=null) |
Sets XML generator instance. | |
static | setEncoding ($encoding) |
Changes the encoding of the generator. | |
static | getXmlRpcValue ($value, $type=self::AUTO_DETECT_TYPE) |
Creates a Value* object, representing a native XML-RPC value A XmlRpcValue object can be created in 3 ways: 1. | |
static | getXmlRpcTypeByValue ($value) |
Get XML-RPC type for a PHP native variable. | |
Public Attributes | |
const | AUTO_DETECT_TYPE = 'auto_detect' |
Specify that the XML-RPC native type will be auto detected from a PHP variable type. | |
const | XML_STRING = 'xml' |
Specify that the XML-RPC value will be parsed out from a given XML code. | |
const | XMLRPC_TYPE_I4 = 'i4' |
All the XML-RPC native types. | |
const | XMLRPC_TYPE_INTEGER = 'int' |
const | XMLRPC_TYPE_I8 = 'i8' |
const | XMLRPC_TYPE_APACHEI8 = 'ex:i8' |
const | XMLRPC_TYPE_DOUBLE = 'double' |
const | XMLRPC_TYPE_BOOLEAN = 'boolean' |
const | XMLRPC_TYPE_STRING = 'string' |
const | XMLRPC_TYPE_DATETIME = 'dateTime.iso8601' |
const | XMLRPC_TYPE_BASE64 = 'base64' |
const | XMLRPC_TYPE_ARRAY = 'array' |
const | XMLRPC_TYPE_STRUCT = 'struct' |
const | XMLRPC_TYPE_NIL = 'nil' |
const | XMLRPC_TYPE_APACHENIL = 'ex:nil' |
Protected Member Functions | |
_setXML ($xml) | |
Static Protected Member Functions | |
static | _phpVarToNativeXmlRpc ($value) |
Transform a PHP native variable into a XML-RPC native value. | |
static | _xmlStringToNativeXmlRpc ($xml) |
Transform an XML string into a XML-RPC native value. | |
static | _createSimpleXMLElement (&$xml) |
static | _extractTypeAndValue (\SimpleXMLElement $xml, &$type, &$value) |
Extract XML/RPC type and value from SimpleXMLElement object. | |
Protected Attributes | |
$value | |
The native XML-RPC representation of this object's value. | |
$type | |
The native XML-RPC type of this object One of the XMLRPC_TYPE_* constants. | |
$xml | |
XML code representation of this object (will be calculated only once) | |
Static Protected Attributes | |
static | $generator |
Represent a native XML-RPC value entity, used as parameters for the methods called by the Zend object and as the return value for those calls.
This object as a very important static function Zend::getXmlRpcValue, this function acts likes a factory for the Zend objects
Using this function, users/Zend object can create the Zend objects from PHP variables, XML string or by specifying the exact XML-RPC native type
|
staticprotected |
|
staticprotected |
Extract XML/RPC type and value from SimpleXMLElement object.
\SimpleXMLElement | $xml | |
string | &$type | Type bind variable |
string | &$value | Value bind variable |
|
staticprotected |
Transform a PHP native variable into a XML-RPC native value.
mixed | $value | The PHP variable for conversion |
Exception\InvalidArgumentException |
|
protected |
$xml |
|
staticprotected |
Transform an XML string into a XML-RPC native value.
string | \SimpleXMLElement | $xml | A SimpleXMLElement object represent the XML string It can be also a valid XML string for conversion |
Exception\ValueException |
generateXml | ( | ) |
Generate XML code that represent a native XML/RPC value.
|
static |
Get XML generator instance.
getType | ( | ) |
Get the native XML-RPC type (the type is one of the Value::XMLRPC_TYPE_* constants)
|
abstract |
Return the value of this object, convert the XML-RPC native value into a PHP variable.
|
static |
Get XML-RPC type for a PHP native variable.
mixed | $value |
Exception\InvalidArgumentException |
|
static |
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)
By default the value type is autodetected according to it's PHP type
mixed | $value | |
Zend\XmlRpc\Value::constant | $type |
Exception\ValueException |
saveXml | ( | ) |
Return the XML code that represent a native MXL-RPC value.
|
static |
Changes the encoding of the generator.
string | $encoding |
|
static |
Sets XML generator instance.
null | Generator\GeneratorInterface | $generator |
|
staticprotected |
|
protected |
The native XML-RPC type of this object One of the XMLRPC_TYPE_* constants.
|
protected |
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 Value objects
|
protected |
XML code representation of this object (will be calculated only once)
const AUTO_DETECT_TYPE = 'auto_detect' |
Specify that the XML-RPC native type will be auto detected from a PHP variable type.
const XML_STRING = 'xml' |
Specify that the XML-RPC value will be parsed out from a given XML code.
const XMLRPC_TYPE_APACHEI8 = 'ex:i8' |
const XMLRPC_TYPE_APACHENIL = 'ex:nil' |
const XMLRPC_TYPE_ARRAY = 'array' |
const XMLRPC_TYPE_BASE64 = 'base64' |
const XMLRPC_TYPE_BOOLEAN = 'boolean' |
const XMLRPC_TYPE_DATETIME = 'dateTime.iso8601' |
const XMLRPC_TYPE_DOUBLE = 'double' |
const XMLRPC_TYPE_I4 = 'i4' |
All the XML-RPC native types.
const XMLRPC_TYPE_I8 = 'i8' |
const XMLRPC_TYPE_INTEGER = 'int' |
const XMLRPC_TYPE_NIL = 'nil' |
const XMLRPC_TYPE_STRING = 'string' |
const XMLRPC_TYPE_STRUCT = 'struct' |