XmlRpc/Value/Scalar.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: Scalar.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_XmlRpc_Value_Scalar
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
- Children
- \Zend_XmlRpc_Value_DateTime
- \Zend_XmlRpc_Value_String
- \Zend_XmlRpc_Value_Integer
- \Zend_XmlRpc_Value_Double
- \Zend_XmlRpc_Value_Boolean
- \Zend_XmlRpc_Value_Nil
- \Zend_XmlRpc_Value_Base64
- 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
XML_STRING
= 'xml'- Inherited_from
- \Zend_XmlRpc_Value::XML_STRING
XMLRPC_TYPE_INTEGER
= 'int'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_INTEGER
XMLRPC_TYPE_I8
= 'i8'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_I8
XMLRPC_TYPE_APACHEI8
= 'ex:i8'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_APACHEI8
XMLRPC_TYPE_DOUBLE
= 'double'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_DOUBLE
XMLRPC_TYPE_BOOLEAN
= 'boolean'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_BOOLEAN
XMLRPC_TYPE_STRING
= 'string'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_STRING
XMLRPC_TYPE_DATETIME
= 'dateTime.iso8601'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_DATETIME
XMLRPC_TYPE_BASE64
= 'base64'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_BASE64
XMLRPC_TYPE_ARRAY
= 'array'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_ARRAY
XMLRPC_TYPE_STRUCT
= 'struct'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_STRUCT
XMLRPC_TYPE_NIL
= 'nil'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_NIL
XMLRPC_TYPE_APACHENIL
= 'ex:nil'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_APACHENIL
Properties

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

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

$_valueIf 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

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

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

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

_setXML(string $xml) : void| Name | Type | Description |
|---|---|---|
| $xml | string |

_xmlStringToNativeXmlRpc(string | \SimpleXMLElement $xml) : \Zend_XmlRpc_ValueTransform an XML string into a XML-RPC native value
Inherited from: \Zend_XmlRpc_Value::_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() : voidGenerate XML code that represent a native XML/RPC value
Inherited from: \Zend_XmlRpc_Value::generateXml()
getGenerator() : \Zend_XmlRpc_Generator_GeneratorAbstract| Type | Description |
|---|---|
| \Zend_XmlRpc_Generator_GeneratorAbstract |

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

getValue() : mixedReturn the value of this object, convert the XML-RPC native value into a PHP variable
Inherited from: \Zend_XmlRpc_Value::getValue()| Type | Description |
|---|---|
| mixed |

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

getXmlRpcValue(mixed $value, \Zend_XmlRpc_Value::constant $type = self::AUTO_DETECT_TYPE) : \Zend_XmlRpc_ValueCreates 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()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() : stringReturn the XML code that represent a native MXL-RPC value
Inherited from: \Zend_XmlRpc_Value::saveXml()| Type | Description |
|---|---|
| string |

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

setGenerator(\Zend_XmlRpc_Generator_GeneratorAbstract $generator) : void| Name | Type | Description |
|---|---|---|
| $generator | \Zend_XmlRpc_Generator_GeneratorAbstract |