ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilLoggingDefinitionProcessor Class Reference
+ Inheritance diagram for ilLoggingDefinitionProcessor:
+ Collaboration diagram for ilLoggingDefinitionProcessor:

Public Member Functions

 __construct (ilDBInterface $db)
 
 purge ()
 This methods is supposed to purge existing data in the provider of the component, so new components can be added to a clean slate. More...
 
 beginComponent (string $component, string $type)
 This method is called when parsing of component.xml for the given component starts. More...
 
 endComponent (string $component, string $type)
 This method is called when parsing of component.xml for the given component ends. More...
 
 beginTag (string $name, array $attributes)
 This is called when a tag starts in the context of the given component. More...
 
 endTag (string $name)
 This is called when a tag ends in the context of the given component. More...
 

Protected Attributes

ilDBInterface $db
 
string $component_id
 

Detailed Description

Definition at line 21 of file class.ilLoggingDefinitionProcessor.php.

Constructor & Destructor Documentation

◆ __construct()

ilLoggingDefinitionProcessor::__construct ( ilDBInterface  $db)

Definition at line 26 of file class.ilLoggingDefinitionProcessor.php.

References $db.

27  {
28  $this->db = $db;
29  }

Member Function Documentation

◆ beginComponent()

ilLoggingDefinitionProcessor::beginComponent ( string  $component,
string  $type 
)

This method is called when parsing of component.xml for the given component starts.

This is supposed to reset any internal parsing state.

Implements ilComponentDefinitionProcessor.

Definition at line 35 of file class.ilLoggingDefinitionProcessor.php.

35  : void
36  {
37  $this->component_id = '';
38  }

◆ beginTag()

ilLoggingDefinitionProcessor::beginTag ( string  $name,
array  $attributes 
)

This is called when a tag starts in the context of the given component.

Parameters
string[]$attributes

Implements ilComponentDefinitionProcessor.

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

References ilLogComponentLevels\updateFromXML().

45  : void
46  {
47  if ($name === "module" || $name === "service") {
48  $this->component_id = $attributes["id"] ?? '';
49  return;
50  }
51 
52  if ($name !== "logging") {
53  return;
54  }
55 
56  if ($this->component_id === '') {
57  throw new \RuntimeException(
58  "Found $name-tag outside of module or service in {$this->component_id}."
59  );
60  }
61  ilLogComponentLevels::updateFromXML($this->component_id);
62  }
static updateFromXML($a_component_id)
+ Here is the call graph for this function:

◆ endComponent()

ilLoggingDefinitionProcessor::endComponent ( string  $component,
string  $type 
)

This method is called when parsing of component.xml for the given component ends.

Implements ilComponentDefinitionProcessor.

Definition at line 40 of file class.ilLoggingDefinitionProcessor.php.

40  : void
41  {
42  $this->component_id = '';
43  }

◆ endTag()

ilLoggingDefinitionProcessor::endTag ( string  $name)

This is called when a tag ends in the context of the given component.

Implements ilComponentDefinitionProcessor.

Definition at line 64 of file class.ilLoggingDefinitionProcessor.php.

64  : void
65  {
66  if ($name === "module" || $name === "service") {
67  $this->component_id = '';
68  }
69  }

◆ purge()

ilLoggingDefinitionProcessor::purge ( )

This methods is supposed to purge existing data in the provider of the component, so new components can be added to a clean slate.

Implements ilComponentDefinitionProcessor.

Definition at line 31 of file class.ilLoggingDefinitionProcessor.php.

31  : void
32  {
33  }

Field Documentation

◆ $component_id

string ilLoggingDefinitionProcessor::$component_id
protected

Definition at line 24 of file class.ilLoggingDefinitionProcessor.php.

◆ $db

ilDBInterface ilLoggingDefinitionProcessor::$db
protected

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

Referenced by __construct().


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