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

Public Member Functions

 __construct (protected \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

string $component = null
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilSecurePathDefinitionProcessor::__construct ( protected \ilDBInterface  $db)

Definition at line 25 of file class.ilSecurePathDefinitionProcessor.php.

26  {
27  }

Member Function Documentation

◆ beginComponent()

ilSecurePathDefinitionProcessor::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 33 of file class.ilSecurePathDefinitionProcessor.php.

References $component.

33  : void
34  {
35  $this->component = $type . "/" . $component;
36  }

◆ beginTag()

ilSecurePathDefinitionProcessor::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 42 of file class.ilSecurePathDefinitionProcessor.php.

References ActiveRecord\findOrFail(), and null.

42  : void
43  {
44  if ($name !== "secure_path") {
45  return;
46  }
47 
48  try {
49  $ilWACSecurePath = ilWACSecurePath::findOrFail($attributes["path"]);
50  } catch (arException) {
51  $ilWACSecurePath = new ilWACSecurePath();
52  $ilWACSecurePath->setPath($attributes["path"]);
53  $ilWACSecurePath->create();
54  }
55  $ilWACSecurePath->setCheckingClass($attributes["checking-class"]);
56  $ilWACSecurePath->setInSecFolder((bool) ($attributes["in-sec-folder"] ?? null));
57  $ilWACSecurePath->setComponentDirectory(realpath(__DIR__ . "/../../../../../" . $this->component));
58  $ilWACSecurePath->update();
59  }
static findOrFail($primary_key, array $add_constructor_args=[])
Tries to find the object and throws an Exception if object is not found, instead of returning null...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ endComponent()

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

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

Implements ilComponentDefinitionProcessor.

Definition at line 38 of file class.ilSecurePathDefinitionProcessor.php.

38  : void
39  {
40  }

◆ endTag()

ilSecurePathDefinitionProcessor::endTag ( string  $name)

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

Implements ilComponentDefinitionProcessor.

Definition at line 61 of file class.ilSecurePathDefinitionProcessor.php.

61  : void
62  {
63  }

◆ purge()

ilSecurePathDefinitionProcessor::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 29 of file class.ilSecurePathDefinitionProcessor.php.

29  : void
30  {
31  }

Field Documentation

◆ $component

string ilSecurePathDefinitionProcessor::$component = null
protected

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

Referenced by beginComponent().


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