ILIAS  release_8 Revision v8.23
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 7 of file class.ilLoggingDefinitionProcessor.php.

Constructor & Destructor Documentation

◆ __construct()

ilLoggingDefinitionProcessor::__construct ( ilDBInterface  $db)

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

References $db.

13  {
14  $this->db = $db;
15  }

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 21 of file class.ilLoggingDefinitionProcessor.php.

21  : void
22  {
23  $this->component_id = '';
24  }

◆ 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 31 of file class.ilLoggingDefinitionProcessor.php.

References ilLogComponentLevels\updateFromXML().

31  : void
32  {
33  if ($name === "module" || $name === "service") {
34  $this->component_id = $attributes["id"] ?? '';
35  return;
36  }
37 
38  if ($name !== "logging") {
39  return;
40  }
41 
42  if ($this->component_id === '') {
43  throw new \RuntimeException(
44  "Found $name-tag outside of module or service in {$this->component_id}."
45  );
46  }
47  ilLogComponentLevels::updateFromXML($this->component_id);
48  }
$attributes
Definition: metadata.php:248
if($format !==null) $name
Definition: metadata.php:247
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 26 of file class.ilLoggingDefinitionProcessor.php.

26  : void
27  {
28  $this->component_id = '';
29  }

◆ endTag()

ilLoggingDefinitionProcessor::endTag ( string  $name)

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

Implements ilComponentDefinitionProcessor.

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

50  : void
51  {
52  if ($name === "module" || $name === "service") {
53  $this->component_id = '';
54  }
55  }
if($format !==null) $name
Definition: metadata.php:247

◆ 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 17 of file class.ilLoggingDefinitionProcessor.php.

17  : void
18  {
19  }

Field Documentation

◆ $component_id

string ilLoggingDefinitionProcessor::$component_id
protected

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

◆ $db

ilDBInterface ilLoggingDefinitionProcessor::$db
protected

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

Referenced by __construct().


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