ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ 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
self::$instance =
new
self
();
36
}
37
return
self::$instance;
38
}
39
45
public
static
function
updateFromXML
($a_component_id)
46
{
47
global
$DIC
;
48
49
$ilDB
= $DIC[
'ilDB'
];
50
51
if
(!$a_component_id) {
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
$query
=
'INSERT INTO log_components (component_id) '
.
60
'VALUES ('
.
61
$ilDB
->quote($a_component_id,
'text'
) .
62
')'
;
63
$ilDB
->manipulate(
$query
);
64
}
65
return
true
;
66
}
67
72
public
function
getLogComponents
()
73
{
74
return
$this->components
;
75
}
76
77
public
function
read
()
78
{
79
global
$DIC
;
80
81
$ilDB
= $DIC[
'ilDB'
];
82
83
$query
=
'SELECT * FROM log_components '
;
84
$res
=
$ilDB
->query(
$query
);
85
86
$this->components = array();
87
while
(
$row
=
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
88
$this->components[] =
new
ilLogComponentLevel
(
$row
->component_id,
$row
->log_level);
89
}
90
}
91
}
$DIC
global $DIC
Definition:
saml.php:7
ilLogComponentLevels\__construct
__construct()
constructor
Definition:
class.ilLogComponentLevels.php:23
ilLogComponentLevels\$components
$components
Definition:
class.ilLogComponentLevels.php:18
ilLogComponentLevels\updateFromXML
static updateFromXML($a_component_id)
type $ilDB
Definition:
class.ilLogComponentLevels.php:45
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilLogComponentLevels
individual log levels for components
Definition:
class.ilLogComponentLevels.php:15
ilLogComponentLevels\$instance
static $instance
Definition:
class.ilLogComponentLevels.php:17
ilLogComponentLevel
individual log levels for components
Definition:
class.ilLogComponentLevel.php:11
$query
$query
Definition:
proxy_ylocal.php:13
$row
$row
Definition:
migrateto20.php:360
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilLogComponentLevels\getInstance
static getInstance()
Definition:
class.ilLogComponentLevels.php:32
ilLogComponentLevels\read
read()
Definition:
class.ilLogComponentLevels.php:77
php
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:13
ilLogComponentLevels\getLogComponents
getLogComponents()
Get compponent level.
Definition:
class.ilLogComponentLevels.php:72
Services
Logging
classes
class.ilLogComponentLevels.php
Generated on Thu Jan 16 2025 19:02:23 for ILIAS by
1.8.13 (using
Doxyfile
)