ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
class.arConfig.php
Go to the documentation of this file.
1
<?
php
2
require_once(
'./Services/ActiveRecord/class.ActiveRecord.php'
);
3
10
class
arConfig
extends
ActiveRecord
{
11
16
static
function
returnDbTableName
() {
17
return
'ar_demo_config'
;
18
}
19
20
24
protected
static
$cache
=
array
();
28
protected
static
$cache_loaded
=
array
();
29
30
36
public
static
function
get
(
$name
) {
37
if
(!self::$cache_loaded[
$name
]) {
38
$obj =
new
self
(
$name
);
39
self::$cache[
$name
] = $obj->getValue();
40
self::$cache_loaded[
$name
] =
true
;
41
}
42
43
return
self::$cache[
$name
];
44
}
45
46
51
public
static
function
set
(
$name
,
$value
) {
52
$obj =
new
self
(
$name
);
53
$obj->setValue(
$value
);
54
if
(self::where(
array
(
'name'
=>
$name
))->hasSets()) {
55
$obj->update();
56
}
else
{
57
$obj->create();
58
}
59
}
60
61
72
protected
$name
;
80
protected
$value
;
81
82
86
public
function
setName
(
$name
) {
87
$this->name =
$name
;
88
}
89
90
94
public
function
getName
() {
95
return
$this->name
;
96
}
97
98
102
public
function
setValue
(
$value
) {
103
$this->value =
$value
;
104
}
105
106
110
public
function
getValue
() {
111
return
$this->value
;
112
}
113
}
114
115
?>
arConfig\$cache_loaded
static $cache_loaded
Definition:
class.arConfig.php:28
arConfig\setValue
setValue($value)
Definition:
class.arConfig.php:102
arConfig\setName
setName($name)
Definition:
class.arConfig.php:86
ActiveRecord
Class ActiveRecord.
Definition:
class.ActiveRecord.php:24
arConfig\getName
getName()
Definition:
class.arConfig.php:94
arConfig\$cache
static $cache
Definition:
class.arConfig.php:24
arConfig\$value
$value
Definition:
class.arConfig.php:80
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
arConfig
Class arConfig.
Definition:
class.arConfig.php:10
php
arConfig\getValue
getValue()
Definition:
class.arConfig.php:110
arConfig\$name
$name
Definition:
class.arConfig.php:72
arConfig\returnDbTableName
static returnDbTableName()
Definition:
class.arConfig.php:16
Services
ActiveRecord
_Examples
Config
class.arConfig.php
Generated on Fri Jan 24 2025 19:01:04 for ILIAS by
1.8.13 (using
Doxyfile
)