API Documentation

Zend/XmlRpc/Value.php

Show: inherited
Table of Contents

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 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: Value.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_XmlRpc_Value

Package: Zend\XmlRpc

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

Children
\Zend_XmlRpc_Value_Collection
\Zend_XmlRpc_Value_Scalar
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Constant  AUTO_DETECT_TYPE = 'auto_detect'

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

Constant  XML_STRING = 'xml'

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

Constant  XMLRPC_TYPE_I4 = 'i4'

All the XML-RPC native types

Constant  XMLRPC_TYPE_INTEGER = 'int'
Constant  XMLRPC_TYPE_I8 = 'i8'
Constant  XMLRPC_TYPE_APACHEI8 = 'ex:i8'
Constant  XMLRPC_TYPE_DOUBLE = 'double'
Constant  XMLRPC_TYPE_BOOLEAN = 'boolean'
Constant  XMLRPC_TYPE_STRING = 'string'
Constant  XMLRPC_TYPE_DATETIME = 'dateTime.iso8601'
Constant  XMLRPC_TYPE_BASE64 = 'base64'
Constant  XMLRPC_TYPE_ARRAY = 'array'
Constant  XMLRPC_TYPE_STRUCT = 'struct'
Constant  XMLRPC_TYPE_NIL = 'nil'
Constant  XMLRPC_TYPE_APACHENIL = 'ex:nil'

Properties

Propertyprotected\Zend_XmlRpc_Generator_GeneratorAbstract  $_generator= ''
static

Propertyprotected  $_type= ''

The native XML-RPC type of this object One of the XMLRPC_TYPE_* constants

Details
Type
Propertyprotected  $_value= ''

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 Zend_XmlRpc_Value objects

Details
Type
Propertyprotected  $_xml= ''

XML code representation of this object (will be calculated only once)

Details
Type

Methods

methodprotected_createSimpleXMLElement(  $xml ) : void
static

Parameters
Name Type Description
$xml
methodprotected_extractTypeAndValue( \SimpleXMLElement $xml, string $type, string $value ) : void
static

Extract XML/RPC type and value from SimpleXMLElement object

Parameters
Name Type Description
$xml \SimpleXMLElement
$type string

&$type Type bind variable

$value string

&$value Value bind variable

methodprotected_phpVarToNativeXmlRpc( mixed $value ) : \Zend_XmlRpc_Value
static

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

Parameters
Name Type Description
$value mixed

The PHP variable for convertion

Returns
Type Description
\Zend_XmlRpc_Value
Details
Static
 
methodprotected_setXML( string $xml ) : void

Parameters
Name Type Description
$xml string
methodprotected_xmlStringToNativeXmlRpc( string|\SimpleXMLElement $xml ) : \Zend_XmlRpc_Value
static

Transform an XML string into a XML-RPC native value

Parameters
Name Type Description
$xml string|\SimpleXMLElement

A SimpleXMLElement object represent the XML string It can be also a valid XML string for convertion

Returns
Type Description
\Zend_XmlRpc_Value
Details
Static
 
methodpublicgenerateXml( ) : void

Generate XML code that represent a native XML/RPC value

methodpublicgetGenerator( ) : \Zend_XmlRpc_Generator_GeneratorAbstract
static

Get XML generator instance

Returns
Type Description
\Zend_XmlRpc_Generator_GeneratorAbstract
methodpublicgetType( ) : string

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

Returns
Type Description
string
methodpublicgetValue( ) : mixed
abstract

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

Returns
Type Description
mixed
methodpublicgetXmlRpcTypeByValue( mixed $value ) : string
static

Get XML-RPC type for a PHP native variable

Parameters
Name Type Description
$value mixed
Returns
Type Description
string
Details
Static
 
methodpublicgetXmlRpcValue( mixed $value, \Zend_XmlRpc_Value::constant $type = self::AUTO_DETECT_TYPE ) : \Zend_XmlRpc_Value
static

Creates a Zend_XmlRpc_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 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

Parameters
Name Type Description
$value mixed
$type \Zend_XmlRpc_Value::constant
Returns
Type Description
\Zend_XmlRpc_Value
Details
Static
 
methodpublicsaveXml( ) : string

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

Returns
Type Description
string
methodpublicsetEncoding( string $encoding ) : void
static

Changes the encoding of the generator

Parameters
Name Type Description
$encoding string
methodpublicsetGenerator( \Zend_XmlRpc_Generator_GeneratorAbstract $generator ) : void
static

Sets XML generator instance

Parameters
Name Type Description
$generator \Zend_XmlRpc_Generator_GeneratorAbstract
Documentation was generated by DocBlox 0.15.1.