ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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)
 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.

References read().

24  {
25  $this->read();
26  }
+ 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.

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

33  {
34  if (!self::$instance) {
35  self::$instance = new self();
36  }
37  return self::$instance;
38  }
+ 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.

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

Referenced by __construct().

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  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
individual log levels for components
$query
$row
global $ilDB
+ Here is the caller graph for this function:

◆ updateFromXML()

static ilLogComponentLevels::updateFromXML (   $a_component_id)
static

type $ilDB

Parameters
type$a_component_id

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

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

Referenced by ilObjDefReader\handlerBeginTag().

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  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ 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.


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