ILIAS  release_7 Revision v7.30-3-g800a261c036
ilLogComponentLevels Class Reference

individual log levels for components More...

+ Collaboration diagram for ilLogComponentLevels:

Public Member Functions

 getLogComponents ()
 Get compponent level. More...
 
 read ()
 

Static Public Member Functions

static getInstance ()
 
static updateFromXML ($a_component_id)
 @global type $ilDB More...
 

Protected Member Functions

 __construct ()
 constructor More...
 

Protected Attributes

 $components = array()
 

Static Protected Attributes

static $instance = null
 

Detailed Description

individual log levels for components

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 15 of file class.ilLogComponentLevels.php.

Constructor & Destructor Documentation

◆ __construct()

ilLogComponentLevels::__construct ( )
protected

constructor

Definition at line 23 of file class.ilLogComponentLevels.php.

24 {
25 $this->read();
26 }

References read().

+ Here is the call graph for this function:

Member Function Documentation

◆ getInstance()

static ilLogComponentLevels::getInstance ( )
static
Returns
ilLogComponentLevels

Definition at line 32 of file class.ilLogComponentLevels.php.

33 {
34 if (!self::$instance) {
35 self::$instance = new self();
36 }
37 return self::$instance;
38 }

References $instance.

Referenced by ilLoggingDBSettings\getLevelByComponent(), ilLogComponentTableGUI\parse(), and ilObjLoggingSettingsGUI\resetComponentLevels().

+ Here is the caller graph for this function:

◆ getLogComponents()

ilLogComponentLevels::getLogComponents ( )

Get compponent level.

Returns
ilLogComponentLevel[]

Definition at line 72 of file class.ilLogComponentLevels.php.

References $components.

◆ read()

ilLogComponentLevels::read ( )

Definition at line 77 of file class.ilLogComponentLevels.php.

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 }
individual log levels for components
global $DIC
Definition: goto.php:24
$query
foreach($_POST as $key=> $value) $res
global $ilDB

References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ updateFromXML()

static ilLogComponentLevels::updateFromXML (   $a_component_id)
static

@global type $ilDB

Parameters
type$a_component_id

Definition at line 45 of file class.ilLogComponentLevels.php.

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 }

References $DIC, $ilDB, $query, and $res.

Referenced by ilObjDefReader\handlerBeginTag().

+ Here is the caller graph for this function:

Field Documentation

◆ $components

ilLogComponentLevels::$components = array()
protected

Definition at line 18 of file class.ilLogComponentLevels.php.

Referenced by getLogComponents().

◆ $instance

ilLogComponentLevels::$instance = null
staticprotected

Definition at line 17 of file class.ilLogComponentLevels.php.

Referenced by getInstance().


The documentation for this class was generated from the following file: