XmlRpc/Value/DateTime.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 [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: DateTime.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_XmlRpc_Value_DateTime

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

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

Propertyprotected\Zend_XmlRpc_Generator_GeneratorAbstract $_generator =
Propertyprotectedstring $_isoFormatString = 'yyyyMMddTHH:mm:ss'

ISO compatible format string for XML/RPC datetime values

Default value'yyyyMMddTHH:mm:ss'Details
Type
string
Propertyprotectedstring $_phpFormatString = 'Ymd\\TH:i:s'

PHP compatible format string for XML/RPC datetime values

Default value'Ymd\\TH:i:s'Details
Type
string
Propertyprotected$_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  
Propertyprotected$_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  
Propertyprotected$_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(mixed $value) : void

Set the value of a dateTime.iso8601 native type

The value is in iso8601 format, minus any timezone information or dashes

Parameters
Name Type Description
$value mixed

Integer of the unix timestamp or any string that can be parsed to a unix timestamp using the PHP strtotime() function

methodprotected_createSimpleXMLElement( $xml) : void
Parameters
Name Type Description
$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
Name Type Description
$xml \SimpleXMLElement
$type string

&$type Type bind variable

$value string

&$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
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
staticinherited

Transform an XML string into a XML-RPC native value

Inherited from: \Zend_XmlRpc_Value::_xmlStringToNativeXmlRpc()\Zend_XmlRpc_Value_Scalar::_xmlStringToNativeXmlRpc()
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
inherited

Generate XML code that represent a native XML/RPC value

Inherited from: \Zend_XmlRpc_Value::generateXml()\Zend_XmlRpc_Value_Scalar::generateXml()
methodpublicgetGenerator() : \Zend_XmlRpc_Generator_GeneratorAbstract
staticinherited

Get XML generator instance

Inherited from: \Zend_XmlRpc_Value::getGenerator()\Zend_XmlRpc_Value_Scalar::getGenerator()
Returns
Type Description
\Zend_XmlRpc_Generator_GeneratorAbstract
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
Type Description
string
methodpublicgetValue() : int

Return the value of this object as iso8601 dateTime value

Returns
Type Description
int As a Unix timestamp
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
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
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
Name Type Description
$value mixed
$type \Zend_XmlRpc_Value::constant
Returns
Type Description
\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
Type Description
string
methodpublicsetEncoding(string $encoding) : void
staticinherited

Changes the encoding of the generator

Inherited from: \Zend_XmlRpc_Value::setEncoding()\Zend_XmlRpc_Value_Scalar::setEncoding()
Parameters
Name Type Description
$encoding string
methodpublicsetGenerator(\Zend_XmlRpc_Generator_GeneratorAbstract $generator) : void
staticinherited

Sets XML generator instance

Inherited from: \Zend_XmlRpc_Value::setGenerator()\Zend_XmlRpc_Value_Scalar::setGenerator()
Parameters
Name Type Description
$generator \Zend_XmlRpc_Generator_GeneratorAbstract
Documentation was generated by phpDocumentor 2.0.0a8.