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

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 Integer.php.

Constructor & Destructor Documentation

XML_RPC2_Backend_Php_Value_Integer::__construct (   $nativeValue)

Constructor.

Will build a new XML_RPC2_Backend_Php_Value_Integer with the given value

Parameters
mixedvalue

Definition at line 67 of file Integer.php.

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

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

+ Here is the call graph for this function:

Member Function Documentation

static XML_RPC2_Backend_Php_Value_Integer::decode (   $xml)
static

decode.

Decode transport XML and set the instance value accordingly

Parameters
mixedThe decoded XML-RPC value,

Definition at line 81 of file Integer.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/int/text()|/value/i4/text()');
// Double cast explanation: http://pear.php.net/bugs/bug.php?id=8644
return (int) ((string) $value[0]);
}

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