ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
◀ ilDoc Overview
class.ilLogComponentLevels.php
Go to the documentation of this file.
1
<?php
2
3
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
include_once
'./Services/Logging/classes/class.ilLogComponentLevel.php'
;
6
7
15
class
ilLogComponentLevels
16
{
17
protected
static
$instance
=
null
;
18
protected
$components
= array();
19
23
protected
function
__construct
()
24
{
25
$this->
read
();
26
}
27
32
public
static
function
getInstance
()
33
{
34
if
(!self::$instance)
35
{
36
self::$instance =
new
self
();
37
}
38
return
self::$instance
;
39
}
40
46
public
static
function
updateFromXML
($a_component_id)
47
{
48
global
$ilDB
;
49
50
if
(!$a_component_id)
51
{
52
return
FALSE;
53
}
54
55
$query
=
'SELECT * FROM log_components '
.
56
'WHERE component_id = '
.$ilDB->quote($a_component_id,
'text'
);
57
$res
=
$ilDB
->query(
$query
);
58
if
(!
$res
->numRows())
59
{
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
()
74
{
75
return
$this->components
;
76
}
77
78
public
function
read
()
79
{
80
global
$ilDB
;
81
82
$query
=
'SELECT * FROM log_components '
;
83
$res
=
$ilDB
->query(
$query
);
84
85
$this->components = array();
86
while
(
$row
=
$res
->fetchRow(
DB_FETCHMODE_OBJECT
))
87
{
88
$this->components[] =
new
ilLogComponentLevel
(
$row
->component_id);
89
}
90
91
}
92
93
}
94
95
?>
DB_FETCHMODE_OBJECT
const DB_FETCHMODE_OBJECT
Definition:
class.ilDB.php:11
ilLogComponentLevel
individual log levels for components
Definition:
class.ilLogComponentLevel.php:12
ilLogComponentLevels
individual log levels for components
Definition:
class.ilLogComponentLevels.php:16
ilLogComponentLevels\getInstance
static getInstance()
Definition:
class.ilLogComponentLevels.php:32
ilLogComponentLevels\updateFromXML
static updateFromXML($a_component_id)
@global type $ilDB
Definition:
class.ilLogComponentLevels.php:46
ilLogComponentLevels\$instance
static $instance
Definition:
class.ilLogComponentLevels.php:17
ilLogComponentLevels\getLogComponents
getLogComponents()
Get compponent level.
Definition:
class.ilLogComponentLevels.php:73
ilLogComponentLevels\read
read()
Definition:
class.ilLogComponentLevels.php:78
ilLogComponentLevels\$components
$components
Definition:
class.ilLogComponentLevels.php:18
ilLogComponentLevels\__construct
__construct()
constructor
Definition:
class.ilLogComponentLevels.php:23
$res
$res
Definition:
examplelayouts.sql.php:25
$row
$row
Definition:
examplelayouts.sql.php:26
$query
$query
Definition:
examplelayouts.sql.php:24
$ilDB
global $ilDB
Definition:
storeScorm2004.php:19
Services
Logging
classes
class.ilLogComponentLevels.php
Generated on Wed Sep 24 2025 19:00:57 for ILIAS by
1.9.4 (using
Doxyfile
)