4 include_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)));
106 $ilDB = $DIC[
'ilDB'];
113 $result =
$ilDB->query(
"SELECT config_value FROM " . $this->table_name .
" WHERE config_key = " .
$ilDB->quote(
$key,
"text"));
119 return (
string) $record[
'config_value'];
130 $ilDB = $DIC[
'ilDB'];
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);
182 $ilDB = $DIC[
'ilDB'];
const TABLE_DOES_NOT_EXIST
setTableName($table_name)
Class ilCloudPluginConfigException.
Class ilCloudPluginConfig.
Create styles array
The data for the language used.
static _fromCamelCase($str)
const NO_VALID_GET_OR_SET_FUNCTION
static _toCamelCase($str, $capitalise_first_char=false)