ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ 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
76
protected
$name
;
84
protected
$value
;
85
86
90
public
function
setName
(
$name
)
91
{
92
$this->name =
$name
;
93
}
94
95
99
public
function
getName
()
100
{
101
return
$this->name
;
102
}
103
104
108
public
function
setValue
(
$value
)
109
{
110
$this->value =
$value
;
111
}
112
113
117
public
function
getValue
()
118
{
119
return
$this->value
;
120
}
121
}
arConfig\$cache_loaded
static $cache_loaded
Definition:
class.arConfig.php:30
arConfig\setValue
setValue($value)
Definition:
class.arConfig.php:108
arConfig\setName
setName($name)
Definition:
class.arConfig.php:90
ActiveRecord
Class ActiveRecord.
Definition:
class.ActiveRecord.php:24
arConfig\getName
getName()
Definition:
class.arConfig.php:99
arConfig\$cache
static $cache
Definition:
class.arConfig.php:26
arConfig\$value
$value
Definition:
class.arConfig.php:84
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
arConfig
Class arConfig.
Definition:
class.arConfig.php:10
arConfig\getValue
getValue()
Definition:
class.arConfig.php:117
arConfig\$name
$name
Definition:
class.arConfig.php:76
arConfig\returnDbTableName
static returnDbTableName()
Definition:
class.arConfig.php:17
Services
ActiveRecord
_Examples
Config
class.arConfig.php
Generated on Tue Jan 28 2025 19:01:27 for ILIAS by
1.8.13 (using
Doxyfile
)