ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilLogComponentLevels.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
5
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
6
7
8
16
class
ilLogComponentLevels
17
{
18
protected
static
?
ilLogComponentLevels
$instance
= null;
22
protected
array
$components
= array();
23
24
protected
ilDBInterface
$db
;
25
29
protected
function
__construct
()
30
{
31
global
$DIC
;
32
$this->db = $DIC->database();
33
$this->
read
();
34
}
35
36
public
static
function
getInstance
():
ilLogComponentLevels
37
{
38
if
(!self::$instance) {
39
self::$instance =
new
self
();
40
}
41
return
self::$instance;
42
}
43
47
public
static
function
updateFromXML
($a_component_id): bool
48
{
49
global
$DIC
;
50
51
$ilDB
= $DIC->database();
52
if
(!$a_component_id) {
53
return
false
;
54
}
55
56
$query
=
'SELECT * FROM log_components '
.
57
'WHERE component_id = '
.
$ilDB
->quote($a_component_id,
'text'
);
58
$res
=
$ilDB
->query(
$query
);
59
if
(!
$res
->numRows()) {
60
$query
=
'INSERT INTO log_components (component_id) '
.
61
'VALUES ('
.
62
$ilDB
->quote($a_component_id,
'text'
) .
63
')'
;
64
$ilDB
->manipulate(
$query
);
65
}
66
return
true
;
67
}
68
73
public
function
getLogComponents
(): array
74
{
75
return
$this->components
;
76
}
77
78
public
function
read
(): void
79
{
80
$query
=
'SELECT * FROM log_components '
;
81
$res
= $this->db->query(
$query
);
82
83
$this->components = array();
84
while
($row =
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
85
$this->components[] =
new
ilLogComponentLevel
((
string
) $row->component_id, (
int
) $row->log_level);
86
}
87
}
88
}
$res
$res
Definition:
ltiservices.php:69
ilLogComponentLevels\$db
ilDBInterface $db
Definition:
class.ilLogComponentLevels.php:24
ilLogComponentLevels\$components
array $components
Definition:
class.ilLogComponentLevels.php:22
ilLogComponentLevels\__construct
__construct()
constructor
Definition:
class.ilLogComponentLevels.php:29
$DIC
global $DIC
Definition:
feed.php:28
ilLogComponentLevels\updateFromXML
static updateFromXML($a_component_id)
Definition:
class.ilLogComponentLevels.php:47
$ilDB
$ilDB
Definition:
storeScorm2004.php:26
ilLogComponentLevels
individual log levels for components
Definition:
class.ilLogComponentLevels.php:16
ilDBInterface
ilLogComponentLevel
individual log levels for components
Definition:
class.ilLogComponentLevel.php:13
$query
$query
Definition:
proxy_ylocal.php:13
ilLogComponentLevels\getInstance
static getInstance()
Definition:
class.ilLogComponentLevels.php:36
ilLogComponentLevels\read
read()
Definition:
class.ilLogComponentLevels.php:78
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:29
ilLogComponentLevels\getLogComponents
getLogComponents()
Get component levels.
Definition:
class.ilLogComponentLevels.php:73
ilLogComponentLevels\$instance
static ilLogComponentLevels $instance
Definition:
class.ilLogComponentLevels.php:18
Services
Logging
classes
class.ilLogComponentLevels.php
Generated on Tue Apr 1 2025 22:02:23 for ILIAS by
1.8.13 (using
Doxyfile
)