4include_once(
'./Modules/Cloud/exceptions/class.ilCloudPluginConfigException.php');
 
   60        $index = substr($method, 3);
 
   61        if (substr($method, 0, 3) == 
'get') {
 
   62            if (!isset($this->cache[
$index])) {
 
   63                $this->cache[
$index] = $this->
getValue(self::_fromCamelCase(substr($method, 3)));
 
   65            if ($this->cache[
$index] == 
null) {
 
   66                $this->cache[
$index] = 
false;
 
   69            return $this->cache[
$index];
 
   70        } elseif (substr($method, 0, 3) == 
'set') {
 
   88        if (!
$ilDB->tableExists($this->table_name)) {
 
   93            $ilDB->insert($this->table_name, array(
"config_key" => array(
"text", 
$key), 
"config_value" => array(
"text", $value)));
 
   95            $ilDB->update($this->table_name, array(
"config_key" => array(
"text", 
$key), 
"config_value" => array(
"text", $value)), array(
"config_key" => array(
"text", 
$key)));
 
  113        $result = 
$ilDB->query(
"SELECT config_value FROM " . $this->table_name . 
" WHERE config_key = " . 
$ilDB->quote(
$key, 
"text"));
 
  119        return (
string) $record[
'config_value'];
 
  132        if (!
$ilDB->tableExists($this->getTableName())) {
 
  134                'config_key'   => array(
 
  138                'config_value' => array(
 
  140                    'notnull' => 
false),);
 
  160        $str[0] = strtolower($str[0]);
 
  161        $func   = create_function(
'$c', 
'return "_" . strtolower($c[1]);');
 
  162        return preg_replace_callback(
'/([A-Z])/', $func, $str);
 
  170    public static function _toCamelCase($str, $capitalise_first_char = 
false)
 
  172        if ($capitalise_first_char) {
 
  173            $str[0] = strtoupper($str[0]);
 
  175        $func = create_function(
'$c', 
'return strtoupper($c[1]);');
 
  176        return preg_replace_callback(
'/-([a-z])/', $func, $str);
 
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)