XmlRpc/Value/Base64.php

Show: PublicProtectedPrivateinherited
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: Base64.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_XmlRpc_Value_Base64

Package: Zend\XmlRpc\Value
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

>VConstant  AUTO_DETECT_TYPE = 'auto_detect'
inherited
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
>VConstant  XML_STRING = 'xml'
inherited
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
>VConstant  XMLRPC_TYPE_I4 = 'i4'
inherited
All the XML-RPC native types
Inherited from: \Zend_XmlRpc_Value::XMLRPC_TYPE_I4\Zend_XmlRpc_Value_Scalar::XMLRPC_TYPE_I4

Properties

>VPropertyprotected\Zend_XmlRpc_Generator_GeneratorAbstract $_generator
>VPropertyprotected$_type
inherited
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
Details
Type
n/a
Inherited_from
\Zend_XmlRpc_Value::$$_type  
Inherited_from
\Zend_XmlRpc_Value_Scalar::$$_type  
>VPropertyprotected$_value
inherited
The native XML-RPC representation of this object's value
Inherited from: \Zend_XmlRpc_Value::$$_value\Zend_XmlRpc_Value_Scalar::$$_value

If the native type of this object is array or struct, this will be an array of Zend_XmlRpc_Value objects

Details
Type
n/a
Inherited_from
\Zend_XmlRpc_Value::$$_value  
Inherited_from
\Zend_XmlRpc_Value_Scalar::$$_value  
>VPropertyprotected$_xml
inherited
XML code representation of this object (will be calculated only once)
Inherited from: \Zend_XmlRpc_Value::$$_xml\Zend_XmlRpc_Value_Scalar::$$_xml
Details
Type
n/a
Inherited_from
\Zend_XmlRpc_Value::$$_xml  
Inherited_from
\Zend_XmlRpc_Value_Scalar::$$_xml  

Methods

methodpublic__construct(string $value,  $alreadyEncoded = false) : void

Set the value of a base64 native type We keep this value in base64 encoding

Parameters
NameTypeDescription
$valuestring
$alreadyEncoded
methodprotected_createSimpleXMLElement( $xml) : void
Parameters
NameTypeDescription
$xml
methodprotected_extractTypeAndValue(\SimpleXMLElement $xml, string $type, string $value) : void
staticinherited

Extract XML/RPC type and value from SimpleXMLElement object

Inherited from: \Zend_XmlRpc_Value::_extractTypeAndValue()\Zend_XmlRpc_Value_Scalar::_extractTypeAndValue()
Parameters
NameTypeDescription
$xml\SimpleXMLElement
$typestring

&$type Type bind variable

$valuestring

&$value Value bind variable

methodprotected_generateXml() : void
inherited

Generate the XML code that represent a scalar native MXL-RPC value

Inherited from: \Zend_XmlRpc_Value_Scalar::_generateXml()
methodprotected_phpVarToNativeXmlRpc(mixed $value) : \Zend_XmlRpc_Value
staticinherited

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

Inherited from: \Zend_XmlRpc_Value::_phpVarToNativeXmlRpc()\Zend_XmlRpc_Value_Scalar::_phpVarToNativeXmlRpc()
Parameters
NameTypeDescription
$valuemixed

The PHP variable for convertion

Returns
TypeDescription
\Zend_XmlRpc_Value
Details
Static
 
methodprotected_setXML(string $xml) : void
Parameters
NameTypeDescription
$xmlstring
methodprotected_xmlStringToNativeXmlRpc(string | \SimpleXMLElement $xml) : \Zend_XmlRpc_Value
staticinherited

Transform an XML string into a XML-RPC native value

Inherited from: \Zend_XmlRpc_Value::_xmlStringToNativeXmlRpc()\Zend_XmlRpc_Value_Scalar::_xmlStringToNativeXmlRpc()
Parameters
NameTypeDescription
$xmlstring | \SimpleXMLElement

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

Returns
TypeDescription
\Zend_XmlRpc_Value
Details
Static
 
methodpublicgenerateXml() : void
inherited

Generate XML code that represent a native XML/RPC value

Inherited from: \Zend_XmlRpc_Value::generateXml()\Zend_XmlRpc_Value_Scalar::generateXml()
methodpublicgetType() : string
inherited

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_Scalar::getType()
Returns
TypeDescription
string
methodpublicgetValue() : string

Return the value of this object, convert the XML-RPC native base64 value into a PHP string We return this value decoded (a normal string)

Returns
TypeDescription
string
methodpublicgetXmlRpcTypeByValue(mixed $value) : string
staticinherited

Get XML-RPC type for a PHP native variable

Inherited from: \Zend_XmlRpc_Value::getXmlRpcTypeByValue()\Zend_XmlRpc_Value_Scalar::getXmlRpcTypeByValue()
Parameters
NameTypeDescription
$valuemixed
Returns
TypeDescription
string
Details
Static
 
methodpublicgetXmlRpcValue(mixed $value, \Zend_XmlRpc_Value::constant $type = self::AUTO_DETECT_TYPE) : \Zend_XmlRpc_Value
staticinherited

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

Parameters
NameTypeDescription
$valuemixed
$type\Zend_XmlRpc_Value::constant
Returns
TypeDescription
\Zend_XmlRpc_Value
Details
Static
 
methodpublicsaveXml() : string
inherited

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

Inherited from: \Zend_XmlRpc_Value::saveXml()\Zend_XmlRpc_Value_Scalar::saveXml()
Returns
TypeDescription
string
methodpublicsetEncoding(string $encoding) : void
staticinherited

Changes the encoding of the generator

Inherited from: \Zend_XmlRpc_Value::setEncoding()\Zend_XmlRpc_Value_Scalar::setEncoding()
Parameters
NameTypeDescription
$encodingstring
methodpublicsetGenerator(\Zend_XmlRpc_Generator_GeneratorAbstract $generator) : void
staticinherited

Sets XML generator instance

Inherited from: \Zend_XmlRpc_Value::setGenerator()\Zend_XmlRpc_Value_Scalar::setGenerator()
Parameters
NameTypeDescription
$generator\Zend_XmlRpc_Generator_GeneratorAbstract
Documentation was generated by phpDocumentor 2.0.0a12.