API Documentation

XmlRpc/Value.php

Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_XmlRpc
subpackage
Value
version
$Id: Value.php 22025 2010-04-27 18:09:14Z matthew $
Classes
Zend_XmlRpc_Value

Description

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.

Zend_XmlRpc_Value

copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_XmlRpc
Constants
AUTO_DETECT_TYPE
XML_STRING
XMLRPC_TYPE_I4
XMLRPC_TYPE_INTEGER
XMLRPC_TYPE_I8
XMLRPC_TYPE_APACHEI8
XMLRPC_TYPE_DOUBLE
XMLRPC_TYPE_BOOLEAN
XMLRPC_TYPE_STRING
XMLRPC_TYPE_DATETIME
XMLRPC_TYPE_BASE64
XMLRPC_TYPE_ARRAY
XMLRPC_TYPE_STRUCT
XMLRPC_TYPE_NIL
XMLRPC_TYPE_APACHENIL
Properties
$_value
$_type
$_xml
$_generator
Methods
getType
getGenerator
setGenerator
setEncoding
getValue
saveXml
generateXml
getXmlRpcValue
_phpVarToNativeXmlRpc
_xmlStringToNativeXmlRpc
_createSimpleXMLElement
_extractTypeAndValue
_setXML

Description

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

Constants

AUTO_DETECT_TYPE

 AUTO_DETECT_TYPE = 'auto_detect'

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

Details

value
auto_detect

XML_STRING

 XML_STRING = 'xml'

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

Details

value
xml

XMLRPC_TYPE_I4

 XMLRPC_TYPE_I4 = 'i4'

All the XML-RPC native types

Details

value
i4

XMLRPC_TYPE_INTEGER

 XMLRPC_TYPE_INTEGER = 'int'

Details

value
int

XMLRPC_TYPE_I8

 XMLRPC_TYPE_I8 = 'i8'

Details

value
i8

XMLRPC_TYPE_APACHEI8

 XMLRPC_TYPE_APACHEI8 = 'ex:i8'

Details

value
ex:i8

XMLRPC_TYPE_DOUBLE

 XMLRPC_TYPE_DOUBLE = 'double'

Details

value
double

XMLRPC_TYPE_BOOLEAN

 XMLRPC_TYPE_BOOLEAN = 'boolean'

Details

value
boolean

XMLRPC_TYPE_STRING

 XMLRPC_TYPE_STRING = 'string'

Details

value
string

XMLRPC_TYPE_DATETIME

 XMLRPC_TYPE_DATETIME = 'dateTime.iso8601'

Details

value
dateTime.iso8601

XMLRPC_TYPE_BASE64

 XMLRPC_TYPE_BASE64 = 'base64'

Details

value
base64

XMLRPC_TYPE_ARRAY

 XMLRPC_TYPE_ARRAY = 'array'

Details

value
array

XMLRPC_TYPE_STRUCT

 XMLRPC_TYPE_STRUCT = 'struct'

Details

value
struct

XMLRPC_TYPE_NIL

 XMLRPC_TYPE_NIL = 'nil'

Details

value
nil

XMLRPC_TYPE_APACHENIL

 XMLRPC_TYPE_APACHENIL = 'ex:nil'

Details

value
ex:nil

Properties

$_generator

Zend_XmlRpc_Generator_GeneratorAbstract $_generator = ''

Details

$_generator
Zend_XmlRpc_Generator_GeneratorAbstract
visibility
protected
default
final
false
static
true

$_type

 $_type = ''

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

Details

visibility
protected
default
final
false
static
false

$_value

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

visibility
protected
default
final
false
static
false

$_xml

 $_xml = ''

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

Details

visibility
protected
default
final
false
static
false

Methods

_createSimpleXMLElement

_createSimpleXMLElement(  $xml ) :
Arguments
$xml
Details
visibility
protected
final
false
static
true

_extractTypeAndValue

_extractTypeAndValue( SimpleXMLElement $xml, string $type, string $value ) : void

Extract XML/RPC type and value from SimpleXMLElement object

Arguments
$xml
SimpleXMLElement
$type
string
&$type Type bind variable
$value
string
&$value Value bind variable
Details
visibility
protected
final
false
static
true

_phpVarToNativeXmlRpc

_phpVarToNativeXmlRpc( mixed $value ) : Zend_XmlRpc_Value

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

Arguments
$value
mixed
The PHP variable for convertion
Details
visibility
protected
final
false
static
true
static

_setXML

_setXML(  $xml ) : void

Arguments
$xml
Details
visibility
protected
final
false
static
false

_xmlStringToNativeXmlRpc

_xmlStringToNativeXmlRpc( string|SimpleXMLElement $xml ) : Zend_XmlRpc_Value

Transform an XML string into a XML-RPC native value

Arguments
$xml
stringSimpleXMLElement
A SimpleXMLElement object represent the XML string It can be also a valid XML string for convertion
Details
visibility
protected
final
false
static
true
static

generateXml

generateXml( ) : void

Generate XML code that represent a native XML/RPC value

Details
visibility
public
final
false
static
false

getGenerator

getGenerator( ) : Zend_XmlRpc_Generator_GeneratorAbstract

Get XML generator instance

Details
visibility
public
final
false
static
true

getType

getType( ) : string

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

Output
string
Details
visibility
public
final
false
static
false

getValue

getValue( ) : mixed

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

Output
mixed
Details
visibility
public
final
false
static
false

getXmlRpcValue

getXmlRpcValue( mixed $value, Zend_XmlRpc_Value::constant $type = self ) : 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. 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

Arguments
$value
mixed
$type
Zend_XmlRpc_Value::constant
Details
visibility
public
final
false
static
true
static

saveXml

saveXml( ) : string

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

Output
string
Details
visibility
public
final
false
static
false

setEncoding

setEncoding( string $encoding ) : void

Changes the encoding of the generator

Arguments
$encoding
string
Details
visibility
public
final
false
static
true

setGenerator

setGenerator( Zend_XmlRpc_Generator_GeneratorAbstract $generator ) : void

Sets XML generator instance

Arguments
$generator
Zend_XmlRpc_Generator_GeneratorAbstract
Details
visibility
public
final
false
static
true
Documentation was generated by DocBlox.