XmlRpc/Value/Nil.php
Zend Framework
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 [email protected] 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: Nil.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_XmlRpc_Value_Nil
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 specifing the exact XML-RPC natvie type
- Parent(s)
- \Zend_XmlRpc_Value_Scalar < \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'Specify that the XML-RPC native type will be auto detected from a PHP variable type
Inherited from: \Zend_XmlRpc_Value::AUTO_DETECT_TYPE\Zend_XmlRpc_Value_Scalar::AUTO_DETECT_TYPE- Inherited_from
- \Zend_XmlRpc_Value::AUTO_DETECT_TYPE
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::AUTO_DETECT_TYPE
XML_STRING
= 'xml'Specify that the XML-RPC value will be parsed out from a given XML code
Inherited from: \Zend_XmlRpc_Value::XML_STRING\Zend_XmlRpc_Value_Scalar::XML_STRING- Inherited_from
- \Zend_XmlRpc_Value::XML_STRING
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::XML_STRING
XMLRPC_TYPE_I4
= 'i4'All the XML-RPC native types
Inherited from: \Zend_XmlRpc_Value::XMLRPC_TYPE_I4\Zend_XmlRpc_Value_Scalar::XMLRPC_TYPE_I4- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_I4
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::XMLRPC_TYPE_I4
XMLRPC_TYPE_INTEGER
= 'int'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_INTEGER
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::XMLRPC_TYPE_INTEGER
XMLRPC_TYPE_I8
= 'i8'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_I8
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::XMLRPC_TYPE_I8
XMLRPC_TYPE_APACHEI8
= 'ex:i8'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_APACHEI8
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::XMLRPC_TYPE_APACHEI8
XMLRPC_TYPE_DOUBLE
= 'double'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_DOUBLE
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::XMLRPC_TYPE_DOUBLE
XMLRPC_TYPE_BOOLEAN
= 'boolean'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_BOOLEAN
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::XMLRPC_TYPE_BOOLEAN
XMLRPC_TYPE_STRING
= 'string'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_STRING
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::XMLRPC_TYPE_STRING
XMLRPC_TYPE_DATETIME
= 'dateTime.iso8601'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_DATETIME
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::XMLRPC_TYPE_DATETIME
XMLRPC_TYPE_BASE64
= 'base64'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_BASE64
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::XMLRPC_TYPE_BASE64
XMLRPC_TYPE_ARRAY
= 'array'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_ARRAY
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::XMLRPC_TYPE_ARRAY
XMLRPC_TYPE_STRUCT
= 'struct'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_STRUCT
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::XMLRPC_TYPE_STRUCT
XMLRPC_TYPE_NIL
= 'nil'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_NIL
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::XMLRPC_TYPE_NIL
XMLRPC_TYPE_APACHENIL
= 'ex:nil'- Inherited_from
- \Zend_XmlRpc_Value::XMLRPC_TYPE_APACHENIL
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::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_Scalar::$$_generator

$_type = The native XML-RPC type of this object One of the XMLRPC_TYPE_* constants
Inherited from: \Zend_XmlRpc_Value::$$_type\Zend_XmlRpc_Value_Scalar::$$_type- Type
- n/a
- Inherited_from
- \Zend_XmlRpc_Value::$$_type
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::$$_type

$_value = The native XML-RPC representation of this object's value
Inherited from: \Zend_XmlRpc_Value::$$_value\Zend_XmlRpc_Value_Scalar::$$_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
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::$$_value

$_xml = XML code representation of this object (will be calculated only once)
Inherited from: \Zend_XmlRpc_Value::$$_xml\Zend_XmlRpc_Value_Scalar::$$_xml- Type
- n/a
- Inherited_from
- \Zend_XmlRpc_Value::$$_xml
- Inherited_from
- \Zend_XmlRpc_Value_Scalar::$$_xml
Methods

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

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

_generateXml() : voidGenerate the XML code that represent a scalar native MXL-RPC value
Inherited from: \Zend_XmlRpc_Value_Scalar::_generateXml()
_phpVarToNativeXmlRpc(mixed $value) : \Zend_XmlRpc_ValueTransform a PHP native variable into a XML-RPC native value
Inherited from: \Zend_XmlRpc_Value::_phpVarToNativeXmlRpc()\Zend_XmlRpc_Value_Scalar::_phpVarToNativeXmlRpc()| Name | Type | Description |
|---|---|---|
| $value | mixed | The PHP variable for convertion |
| Type | Description |
|---|---|
| \Zend_XmlRpc_Value |
- Static

_xmlStringToNativeXmlRpc(string | \SimpleXMLElement $xml) : \Zend_XmlRpc_ValueTransform an XML string into a XML-RPC native value
Inherited from: \Zend_XmlRpc_Value::_xmlStringToNativeXmlRpc()\Zend_XmlRpc_Value_Scalar::_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()\Zend_XmlRpc_Value_Scalar::generateXml()
getGenerator() : \Zend_XmlRpc_Generator_GeneratorAbstractGet XML generator instance
Inherited from: \Zend_XmlRpc_Value::getGenerator()\Zend_XmlRpc_Value_Scalar::getGenerator()| 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()\Zend_XmlRpc_Value_Scalar::getType()| Type | Description |
|---|---|
| string |

getValue() : nullReturn the value of this object, convert the XML-RPC native nill value into a PHP NULL
| Type | Description |
|---|---|
| null |

getXmlRpcTypeByValue(mixed $value) : stringGet XML-RPC type for a PHP native variable
Inherited from: \Zend_XmlRpc_Value::getXmlRpcTypeByValue()\Zend_XmlRpc_Value_Scalar::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()\Zend_XmlRpc_Value_Scalar::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()\Zend_XmlRpc_Value_Scalar::saveXml()| Type | Description |
|---|---|
| string |

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

setGenerator(\Zend_XmlRpc_Generator_GeneratorAbstract $generator) : voidSets XML generator instance
Inherited from: \Zend_XmlRpc_Value::setGenerator()\Zend_XmlRpc_Value_Scalar::setGenerator()| Name | Type | Description |
|---|---|---|
| $generator | \Zend_XmlRpc_Generator_GeneratorAbstract |