ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
◀ ilDoc Overview
Double.php
Go to the documentation of this file.
1
<?php
2
3
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
4
5
// LICENSE AGREEMENT. If folded, press za here to unfold and read license {{{
6
40
// }}}
41
42
// dependencies {{{
43
require_once
'XML/RPC2/Exception.php'
;
44
require_once
'XML/RPC2/Backend/Php/Value/Scalar.php'
;
45
// }}}
46
57
class
XML_RPC2_Backend_Php_Value_Double
extends
XML_RPC2_Backend_Php_Value_Scalar
58
{
59
60
// {{{ constructor
61
67
public
function
__construct
($nativeValue)
68
{
69
$this->
setScalarType
(
'double'
);
70
$this->
setNativeValue
($nativeValue);
71
}
72
73
// }}}
74
// {{{ decode()
75
81
public
static
function
decode
($xml)
82
{
83
// TODO Remove reparsing of XML fragment, when SimpleXML proves more solid. Currently it segfaults when
84
// xpath is used both in an element and in one of its children
85
$xml = simplexml_load_string($xml->asXML());
86
$value = $xml->xpath(
'/value/double/text()'
);
87
88
// Double cast explanation: http://pear.php.net/bugs/bug.php?id=8644
89
return
(
double
) ((string) $value[0]);
90
}
91
92
// }}}
93
94
}
95
96
?>
XML_RPC2_Backend_Php_Value_Scalar\setScalarType
setScalarType($value)
scalarType property setter
Definition:
Scalar.php:77
XML_RPC2_Backend_Php_Value_Scalar
Definition:
Scalar.php:57
XML_RPC2_Backend_Php_Value_Double\__construct
__construct($nativeValue)
Constructor.
Definition:
Double.php:67
XML_RPC2_Backend_Php_Value_Double
Definition:
Double.php:57
XML_RPC2_Backend_Php_Value_Double\decode
static decode($xml)
decode.
Definition:
Double.php:81
XML_RPC2_Backend_Php_Value\setNativeValue
setNativeValue($value)
nativeValue setter
Definition:
Value.php:89
Services
PEAR
lib
XML
RPC2
Backend
Php
Value
Double.php
Generated on Wed Aug 27 2025 19:01:01 for ILIAS by
1.8.13 (using
Doxyfile
)