ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ 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
{
12
17
public
static
function
returnDbTableName
()
18
{
19
return
'ar_demo_config'
;
20
}
21
22
26
protected
static
$cache
= array();
30
protected
static
$cache_loaded
= array();
31
32
38
public
static
function
get
(
$name
)
39
{
40
if
(!self::$cache_loaded[
$name
]) {
41
$obj =
new
self
(
$name
);
42
self::$cache[
$name
] = $obj->getValue();
43
self::$cache_loaded[
$name
] =
true
;
44
}
45
46
return
self::$cache[
$name
];
47
}
48
49
54
public
static
function
set
(
$name
,
$value
)
55
{
56
$obj =
new
self
(
$name
);
57
$obj->setValue(
$value
);
58
if
(self::where(array(
'name'
=>
$name
))->hasSets()) {
59
$obj->update();
60
}
else
{
61
$obj->create();
62
}
63
}
64
65
75
protected
$name
;
83
protected
$value
;
84
85
89
public
function
setName
(
$name
)
90
{
91
$this->name =
$name
;
92
}
93
94
98
public
function
getName
()
99
{
100
return
$this->name
;
101
}
102
103
107
public
function
setValue
(
$value
)
108
{
109
$this->value =
$value
;
110
}
111
112
116
public
function
getValue
()
117
{
118
return
$this->value
;
119
}
120
}
arConfig\$cache_loaded
static $cache_loaded
Definition:
class.arConfig.php:30
arConfig\setValue
setValue($value)
Definition:
class.arConfig.php:107
arConfig\setName
setName($name)
Definition:
class.arConfig.php:89
ActiveRecord
Class ActiveRecord.
Definition:
class.ActiveRecord.php:24
arConfig\getName
getName()
Definition:
class.arConfig.php:98
arConfig\$cache
static $cache
Definition:
class.arConfig.php:26
arConfig\$value
$value
Definition:
class.arConfig.php:83
arConfig
Class arConfig.
Definition:
class.arConfig.php:10
php
arConfig\getValue
getValue()
Definition:
class.arConfig.php:116
arConfig\$name
$name
Definition:
class.arConfig.php:75
arConfig\returnDbTableName
static returnDbTableName()
Definition:
class.arConfig.php:17
Services
ActiveRecord
_Examples
Config
class.arConfig.php
Generated on Thu Mar 13 2025 19:01:52 for ILIAS by
1.8.13 (using
Doxyfile
)