ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilSamlSettings.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
25 final class ilSamlSettings
26 {
27  private static ?self $instance = null;
28  private readonly ilSetting $settings;
29 
30  private function __construct()
31  {
32  $this->settings = new ilSetting('auth_saml');
33  }
34 
35  public static function getInstance(): self
36  {
37  if (null === self::$instance) {
38  self::$instance = new self();
39  }
40 
41  return self::$instance;
42  }
43 
44  public function isDisplayedOnLoginPage(): bool
45  {
46  return (bool) $this->settings->get('login_form', '0');
47  }
48 
49  public function setLoginFormStatus(bool $displayed_on_login_page): void
50  {
51  $this->settings->set('login_form', (string) ((int) $displayed_on_login_page));
52  }
53 }
readonly ilSetting $settings
Class ilSamlSettings.
setLoginFormStatus(bool $displayed_on_login_page)