4include_once(
'./Modules/Cloud/exceptions/class.ilCloudPluginConfigException.php');
 
   63    public function __call($method, $params)
 
   65        $index = substr($method, 3);
 
   66        if (substr($method, 0, 3) == 
'get') {
 
   67            if (!isset($this->cache[
$index])) {
 
   68                $this->cache[
$index] = $this->
getValue(self::_fromCamelCase(substr($method, 3)));
 
   70            if ($this->cache[
$index] == 
null) {
 
   71                $this->cache[
$index] = 
false;
 
   74            return $this->cache[
$index];
 
   76            if (substr($method, 0, 3) == 
'set') {
 
   77                $this->cache[
$index] = $params[0];
 
   78                $this->
setValue(self::_fromCamelCase(substr($method, 3)), $params[0]);
 
   97        if (!
$ilDB->tableExists($this->table_name)) {
 
  101        if (!is_string($this->
getValue($key))) {
 
  102            $ilDB->insert($this->table_name, array(
"config_key" => array(
"text", $key), 
"config_value" => array(
"text", $value)));
 
  104            $ilDB->update($this->table_name, array(
"config_key" => array(
"text", $key), 
"config_value" => array(
"text", $value)), array(
"config_key" => array(
"text", $key)));
 
  123        $result = 
$ilDB->query(
"SELECT config_value FROM " . $this->table_name . 
" WHERE config_key = " . 
$ilDB->quote($key, 
"text"));
 
  130        return (
string) $record[
'config_value'];
 
  142        if (!
$ilDB->tableExists($this->getTableName())) {
 
  144                'config_key' => array(
 
  149                'config_value' => array(
 
  173        $str[0] = strtolower($str[0]);
 
  175        return preg_replace_callback(
'/([A-Z])/', 
function (
$c) {
 
  176            return "_" . strtolower(
$c[1]);
 
  187    public static function _toCamelCase($str, $capitalise_first_char = 
false)
 
  189        if ($capitalise_first_char) {
 
  190            $str[0] = strtoupper($str[0]);
 
  193        return preg_replace_callback(
'/-([a-z])/', 
function (
$c) {
 
  194            return strtoupper(
$c[1]);
 
An exception for terminatinating execution or to throw for unit testing.
Class ilCloudPluginConfigException.
const NO_VALID_GET_OR_SET_FUNCTION
const TABLE_DOES_NOT_EXIST
Class ilCloudPluginConfig.
static _toCamelCase($str, $capitalise_first_char=false)
static _fromCamelCase($str)
setTableName($table_name)