ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilTreeMetricsCollectedObjective.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
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
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}
Base class to simplify collection of metrics.
collectFrom(Environment $environment, Storage $storage)
An environment holds resources to be used in the setup process.
Definition: Environment.php:28
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
storeConfigText(string $key, string $value, ?string $description=null)