ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 {
36 self::$instance = new self();
37 }
38 return self::$instance;
39 }

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 73 of file class.ilLogComponentLevels.php.

References $components.

◆ read()

ilLogComponentLevels::read ( )

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

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 }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
individual log levels for components
global $ilDB

References $ilDB, $query, $res, $row, and DB_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 46 of file class.ilLogComponentLevels.php.

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 }

References $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: