XmlRpc/Value/Struct.php
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_XmlRpc
- Subpackage
- Value
- Version
- $Id: Struct.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_XmlRpc_Value_Struct
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
- Parent(s)
- \Zend_XmlRpc_Value_Collection < \Zend_XmlRpc_Value
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants

AUTO_DETECT_TYPE
= 'auto_detect'
- Inherited_from
- \Zend_XmlRpc_Value::AUTO_DETECT_TYPE
- Inherited_from
- \Zend_XmlRpc_Value_Collection::AUTO_DETECT_TYPE

XML_STRING
= 'xml'
- Inherited_from
- \Zend_XmlRpc_Value::XML_STRING
- Inherited_from
- \Zend_XmlRpc_Value_Collection::XML_STRING

XMLRPC_TYPE_I4
= 'i4'
- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_I4
- Inherited_from
- \Zend_XmlRpc_Value_Collection::XMLRPC_TYPE_I4

XMLRPC_TYPE_INTEGER
= 'int'
- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_INTEGER
- Inherited_from
- \Zend_XmlRpc_Value_Collection::XMLRPC_TYPE_INTEGER

XMLRPC_TYPE_I8
= 'i8'
- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_I8
- Inherited_from
- \Zend_XmlRpc_Value_Collection::XMLRPC_TYPE_I8

XMLRPC_TYPE_APACHEI8
= 'ex:i8'
- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_APACHEI8
- Inherited_from
- \Zend_XmlRpc_Value_Collection::XMLRPC_TYPE_APACHEI8

XMLRPC_TYPE_DOUBLE
= 'double'
- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_DOUBLE
- Inherited_from
- \Zend_XmlRpc_Value_Collection::XMLRPC_TYPE_DOUBLE

XMLRPC_TYPE_BOOLEAN
= 'boolean'
- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_BOOLEAN
- Inherited_from
- \Zend_XmlRpc_Value_Collection::XMLRPC_TYPE_BOOLEAN

XMLRPC_TYPE_STRING
= 'string'
- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_STRING
- Inherited_from
- \Zend_XmlRpc_Value_Collection::XMLRPC_TYPE_STRING

XMLRPC_TYPE_DATETIME
= 'dateTime.iso8601'
- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_DATETIME
- Inherited_from
- \Zend_XmlRpc_Value_Collection::XMLRPC_TYPE_DATETIME

XMLRPC_TYPE_BASE64
= 'base64'
- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_BASE64
- Inherited_from
- \Zend_XmlRpc_Value_Collection::XMLRPC_TYPE_BASE64

XMLRPC_TYPE_ARRAY
= 'array'
- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_ARRAY
- Inherited_from
- \Zend_XmlRpc_Value_Collection::XMLRPC_TYPE_ARRAY

XMLRPC_TYPE_STRUCT
= 'struct'
- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_STRUCT
- Inherited_from
- \Zend_XmlRpc_Value_Collection::XMLRPC_TYPE_STRUCT

XMLRPC_TYPE_NIL
= 'nil'
- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_NIL
- Inherited_from
- \Zend_XmlRpc_Value_Collection::XMLRPC_TYPE_NIL

XMLRPC_TYPE_APACHENIL
= 'ex:nil'
- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_APACHENIL
- Inherited_from
- \Zend_XmlRpc_Value_Collection::XMLRPC_TYPE_APACHENIL
Properties


\Zend_XmlRpc_Generator_GeneratorAbstract $_generator
- Type
- \Zend_XmlRpc_Generator_GeneratorAbstract
- Inherited_from
- \Zend_XmlRpc_Value::$$_generator
- Inherited_from
- \Zend_XmlRpc_Value_Collection::$$_generator


$_type
- Type
- n/a
- Inherited_from
- \Zend_XmlRpc_Value::$$_type
- Inherited_from
- \Zend_XmlRpc_Value_Collection::$$_type


$_value
If the native type of this object is array or struct, this will be an array of Zend_XmlRpc_Value objects
- Type
- n/a
- Inherited_from
- \Zend_XmlRpc_Value::$$_value
- Inherited_from
- \Zend_XmlRpc_Value_Collection::$$_value


$_xml
- Type
- n/a
- Inherited_from
- \Zend_XmlRpc_Value::$$_xml
- Inherited_from
- \Zend_XmlRpc_Value_Collection::$$_xml
Methods


__construct(array $value) : void
Set the value of an struct native type
Name | Type | Description |
---|---|---|
$value | array |


_createSimpleXMLElement( $xml) : void
Name | Type | Description |
---|---|---|
$xml |


_extractTypeAndValue(\SimpleXMLElement $xml, string $type, string $value) : void
Extract XML/RPC type and value from SimpleXMLElement object
Inherited from: \Zend_XmlRpc_Value::_extractTypeAndValue()\Zend_XmlRpc_Value_Collection::_extractTypeAndValue()Name | Type | Description |
---|---|---|
$xml | \SimpleXMLElement | |
$type | string | &$type Type bind variable |
$value | string | &$value Value bind variable |


_phpVarToNativeXmlRpc(mixed $value) : \Zend_XmlRpc_Value
Transform a PHP native variable into a XML-RPC native value
Inherited from: \Zend_XmlRpc_Value::_phpVarToNativeXmlRpc()\Zend_XmlRpc_Value_Collection::_phpVarToNativeXmlRpc()Name | Type | Description |
---|---|---|
$value | mixed | The PHP variable for convertion |
Type | Description |
---|---|
\Zend_XmlRpc_Value |
- Static


_xmlStringToNativeXmlRpc(string | \SimpleXMLElement $xml) : \Zend_XmlRpc_Value
Transform an XML string into a XML-RPC native value
Inherited from: \Zend_XmlRpc_Value::_xmlStringToNativeXmlRpc()\Zend_XmlRpc_Value_Collection::_xmlStringToNativeXmlRpc()Name | Type | Description |
---|---|---|
$xml | string | \SimpleXMLElement | A SimpleXMLElement object represent the XML string It can be also a valid XML string for convertion |
Type | Description |
---|---|
\Zend_XmlRpc_Value |
- Static


generateXml() : void
Generate XML code that represent a native XML/RPC value
Inherited from: \Zend_XmlRpc_Value::generateXml()\Zend_XmlRpc_Value_Collection::generateXml()

getGenerator() : \Zend_XmlRpc_Generator_GeneratorAbstract
Get XML generator instance
Inherited from: \Zend_XmlRpc_Value::getGenerator()\Zend_XmlRpc_Value_Collection::getGenerator()Type | Description |
---|---|
\Zend_XmlRpc_Generator_GeneratorAbstract |


getType() : string
Get the native XML-RPC type (the type is one of the Zend_XmlRpc_Value::XMLRPC_TYPE_* constants)
Inherited from: \Zend_XmlRpc_Value::getType()\Zend_XmlRpc_Value_Collection::getType()Type | Description |
---|---|
string |


getValue() : \arary
Return the value of this object, convert the XML-RPC native collection values into a PHP array
Inherited from: \Zend_XmlRpc_Value_Collection::getValue()Type | Description |
---|---|
\arary |


getXmlRpcTypeByValue(mixed $value) : string
Get XML-RPC type for a PHP native variable
Inherited from: \Zend_XmlRpc_Value::getXmlRpcTypeByValue()\Zend_XmlRpc_Value_Collection::getXmlRpcTypeByValue()Name | Type | Description |
---|---|---|
$value | mixed |
Type | Description |
---|---|
string |
- Static


getXmlRpcValue(mixed $value, \Zend_XmlRpc_Value::constant $type = self::AUTO_DETECT_TYPE) : \Zend_XmlRpc_Value
Creates a Zend_XmlRpc_Value* object, representing a native XML-RPC value A XmlRpcValue object can be created in 3 ways: 1.
Inherited from: \Zend_XmlRpc_Value::getXmlRpcValue()\Zend_XmlRpc_Value_Collection::getXmlRpcValue()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)
By default the value type is autodetected according to it's PHP type
Name | Type | Description |
---|---|---|
$value | mixed | |
$type | \Zend_XmlRpc_Value::constant |
Type | Description |
---|---|
\Zend_XmlRpc_Value |
- Static


saveXml() : string
Return the XML code that represent a native MXL-RPC value
Inherited from: \Zend_XmlRpc_Value::saveXml()\Zend_XmlRpc_Value_Collection::saveXml()Type | Description |
---|---|
string |


setEncoding(string $encoding) : void
Changes the encoding of the generator
Inherited from: \Zend_XmlRpc_Value::setEncoding()\Zend_XmlRpc_Value_Collection::setEncoding()Name | Type | Description |
---|---|---|
$encoding | string |


setGenerator(\Zend_XmlRpc_Generator_GeneratorAbstract $generator) : void
Sets XML generator instance
Inherited from: \Zend_XmlRpc_Value::setGenerator()\Zend_XmlRpc_Value_Collection::setGenerator()Name | Type | Description |
---|---|---|
$generator | \Zend_XmlRpc_Generator_GeneratorAbstract |