ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilLSGlobalSettingsDB.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
7{
8 const SETTING_POLL_INTERVAL = 'lso_polling_interval';
9 const POLL_INTERVAL_DEFAULT = 10; //in seconds
10
14 protected $il_settings;
15
17 {
18 $this->il_settings = $il_settings;
19 }
20
21 public function getSettings() : LSGlobalSettings
22 {
23 $interval_seconds = (float) $this->il_settings->get(
24 self::SETTING_POLL_INTERVAL,
25 self::POLL_INTERVAL_DEFAULT
26 );
27
28 return new LSGlobalSettings($interval_seconds);
29 }
30
31 public function storeSettings(LSGlobalSettings $settings)
32 {
33 $this->il_settings->set(
34 self::SETTING_POLL_INTERVAL,
35 $settings->getPollingIntervalSeconds()
36 );
37 }
38}
An exception for terminatinating execution or to throw for unit testing.
Global Settings of the Learning Sequence.
Repository for LSGlobalSettings over ILIAS global settings.
storeSettings(LSGlobalSettings $settings)
__construct(\ilSetting $il_settings)
ILIAS Setting Class.
Repository for LSGlobalSettings.