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

Static Public Member Functions

static decode ($xml)
 Decode transport XML and set the instance value accordingly.
- 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 String.php.

Constructor & Destructor Documentation

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

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

+ Here is the call graph for this function:

Member Function Documentation

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.

{
/* Stupid way of testing for the presence of string element. I don't know another one.
At least got rid of the xpath and consequent reparsing of the XML
*/
if ($xml->string->asXML() === FALSE) {
return (string) $xml;
} else {
return (string) $xml->string;
}
}
XML_RPC2_Backend_Php_Value_String::encode ( )

Encode the instance into XML, for transport.

Returns
string The encoded XML-RPC value,

Reimplemented from XML_RPC2_Backend_Php_Value_Scalar.

Definition at line 81 of file String.php.

References XML_RPC2_Backend_Php_Value\getNativeValue().

{
return '<string>' . strtr($this->getNativeValue(),array('&' => '&amp;', '<' => '&lt;' , '>' => '&gt;')) . '</string>';
}

+ Here is the call graph for this function:


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