ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilTreeMetricsCollectedObjective.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
24 
26 {
27  protected function getTentativePreconditions(Environment $environment): array
28  {
29  return [
32  ];
33  }
34 
35  protected function collectFrom(Environment $environment, Storage $storage): void
36  {
37  $db = $environment->getResource(Environment::RESOURCE_DATABASE);
38  $settings_factory = $environment->getResource(Environment::RESOURCE_SETTINGS_FACTORY);
39 
40  if (!$settings_factory || !$db) {
41  return;
42  }
43 
44  $settings = $settings_factory->settingsFor('common');
45 
46  $storage->storeConfigText(
47  'Tree Implementation',
48  $settings->get('main_tree_impl', 'ns') === 'ns' ? 'Nested Set' : 'Materialized Path',
49  'The database implementation of the ILIAS repository tree.'
50  );
51  }
52 }
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
storeConfigText(string $key, string $value, string $description=null)
collectFrom(Environment $environment, Storage $storage)
Base class to simplify collection of metrics.
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
An environment holds resources to be used in the setup process.
Definition: Environment.php:27