ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Value.php
Go to the documentation of this file.
1<?php
2
3/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
4
5// LICENSE AGREEMENT. If folded, press za here to unfold and read license {{{
6
40// }}}
41
42// dependencies {{{
43require_once 'XML/RPC2/Exception.php';
44require_once 'XML/RPC2/Backend.php';
45// }}}
46
57abstract class XML_RPC2_Value
58{
59 // {{{ createFromNative()
60
68 public static function createFromNative($value, $explicitType = null)
69 {
70 $xmlrpcTypes = array('int', 'boolean', 'string', 'double', 'datetime', 'base64', 'struct', 'array');
71 if (in_array($explicitType, $xmlrpcTypes)) {
72 return @call_user_func(array(XML_RPC2_Backend::getValueClassname(), 'createFromNative'), $value, $explicitType);
73 }
74 return $value;
75 }
76
77 // }}}
78
79}
80
81?>
static getValueClassname()
Include the relevant php files for the value class, and return the backend value class name.
Definition: Backend.php:185
static createFromNative($value, $explicitType=null)
Factory method that constructs the appropriate XML-RPC encoded type value.
Definition: Value.php:68