ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
XML_RPC2_Backend_Php_Value_String Class Reference
+ Inheritance diagram for XML_RPC2_Backend_Php_Value_String:
+ Collaboration diagram for XML_RPC2_Backend_Php_Value_String:

Public Member Functions

 __construct ($nativeValue)
 Constructor. More...
 
 encode ()
 Encode the instance into XML, for transport. 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 transport XML and set the instance value accordingly. 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 String.php.

Constructor & Destructor Documentation

◆ __construct()

XML_RPC2_Backend_Php_Value_String::__construct (   $nativeValue)

Constructor.

Will build a new XML_RPC2_Backend_Php_Value_String with the given value

Parameters
mixedvalue

Definition at line 67 of file String.php.

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

68  {
69  $this->setScalarType('string');
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_String::decode (   $xml)
static

Decode transport XML and set the instance value accordingly.

Parameters
mixedThe encoded XML-RPC value,

Definition at line 94 of file String.php.

95  {
96  /* Stupid way of testing for the presence of string element. I don't know another one.
97  At least got rid of the xpath and consequent reparsing of the XML
98  */
99  if ($xml->string->asXML() === FALSE) {
100  return (string) $xml;
101  } else {
102  return (string) $xml->string;
103  }
104  }

◆ encode()

XML_RPC2_Backend_Php_Value_String::encode ( )

Encode the instance into XML, for transport.

Returns
string The encoded XML-RPC value,

Definition at line 81 of file String.php.

References XML_RPC2_Backend_Php_Value\getNativeValue().

82  {
83  return '<string>' . strtr($this->getNativeValue(),array('&' => '&amp;', '<' => '&lt;' , '>' => '&gt;')) . '</string>';
84  }
getNativeValue()
nativeValue property getter
Definition: Value.php:76
+ Here is the call graph for this function:

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