ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
XML_RPC2_Backend_Php_Value_Double Class Reference
+ Inheritance diagram for XML_RPC2_Backend_Php_Value_Double:
+ Collaboration diagram for XML_RPC2_Backend_Php_Value_Double:

Public Member Functions

 __construct ($nativeValue)
 Constructor.
- Public Member Functions inherited from XML_RPC2_Backend_Php_Value_Scalar
 getScalarType ()
 scalarType property getter
 __construct ($scalarType, $nativeValue)
 Constructor.
 encode ()
 Encode the instance into XML, for transport.
- Public Member Functions inherited from XML_RPC2_Backend_Php_Value
 getNativeValue ()
 nativeValue property getter

Static Public Member Functions

static decode ($xml)
 decode.
- Static Public Member Functions inherited from XML_RPC2_Backend_Php_Value_Scalar
static createFromNative ($nativeValue, $explicitType=null)
 Choose a XML_RPC2_Value subclass appropriate for the given value and create it.
- Static Public Member Functions inherited from XML_RPC2_Backend_Php_Value
static createFromDecode ($simpleXML)
 Decode an encoded value and build the applicable XML_RPC2_Value subclass.

Additional Inherited Members

- Protected Member Functions inherited from XML_RPC2_Backend_Php_Value_Scalar
 setScalarType ($value)
 scalarType property setter

Detailed Description

Definition at line 57 of file Double.php.

Constructor & Destructor Documentation

XML_RPC2_Backend_Php_Value_Double::__construct (   $nativeValue)

Constructor.

Will build a new XML_RPC2_Backend_Php_Value_Double with the given value

Parameters
mixedvalue

Definition at line 67 of file Double.php.

References XML_RPC2_Backend_Php_Value\setNativeValue(), and XML_RPC2_Backend_Php_Value_Scalar\setScalarType().

{
$this->setScalarType('double');
$this->setNativeValue($nativeValue);
}

+ Here is the call graph for this function:

Member Function Documentation

static XML_RPC2_Backend_Php_Value_Double::decode (   $xml)
static

decode.

Decode transport XML and set the instance value accordingly

Parameters
mixedThe encoded XML-RPC value,

Definition at line 81 of file Double.php.

{
// TODO Remove reparsing of XML fragment, when SimpleXML proves more solid. Currently it segfaults when
// xpath is used both in an element and in one of its children
$xml = simplexml_load_string($xml->asXML());
$value = $xml->xpath('/value/double/text()');
// Double cast explanation: http://pear.php.net/bugs/bug.php?id=8644
return (double) ((string) $value[0]);
}

The documentation for this class was generated from the following file: