ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules 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. More...
 
- Public Member Functions inherited from XML_RPC2_Backend_Php_Value_Scalar
 getScalarType ()
 scalarType property getter More...
 
 __construct ($scalarType, $nativeValue)
 Constructor. More...
 
 encode ()
 Encode the instance into XML, for transport. More...
 
- Public Member Functions inherited from XML_RPC2_Backend_Php_Value
 getNativeValue ()
 nativeValue property getter More...
 

Static Public Member Functions

static decode ($xml)
 decode. More...
 
- 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. More...
 
- Static Public Member Functions inherited from XML_RPC2_Backend_Php_Value
static createFromNative ($nativeValue, $explicitType=null)
 Choose a XML_RPC2_Value subclass appropriate for the given value and create it. More...
 
static createFromDecode ($simpleXML)
 Decode an encoded value and build the applicable XML_RPC2_Value subclass. More...
 
- Static Public Member Functions inherited from XML_RPC2_Value
static createFromNative ($value, $explicitType=null)
 Factory method that constructs the appropriate XML-RPC encoded type value. More...
 

Additional Inherited Members

- Protected Member Functions inherited from XML_RPC2_Backend_Php_Value_Scalar
 setScalarType ($value)
 scalarType property setter More...
 
- Protected Member Functions inherited from XML_RPC2_Backend_Php_Value
 setNativeValue ($value)
 nativeValue setter More...
 

Detailed Description

Definition at line 57 of file Integer.php.

Constructor & Destructor Documentation

◆ __construct()

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().

68  {
69  $this->setScalarType('int');
70  $this->setNativeValue($nativeValue);
71  }
setScalarType($value)
scalarType property setter
Definition: Scalar.php:77
setNativeValue($value)
nativeValue setter
Definition: Value.php:89
+ Here is the call graph for this function:

Member Function Documentation

◆ decode()

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.

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/int/text()|/value/i4/text()');
87 
88  // Double cast explanation: http://pear.php.net/bugs/bug.php?id=8644
89  return (int) ((string) $value[0]);
90  }

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