ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilUserCreationContext.php
Go to the documentation of this file.
1<?php
2
23{
24 public const CONTEXT_REGISTRATION = 1;
25 public const CONTEXT_ADMINISTRATION = 2;
26 public const CONTEXT_SOAP = 3;
27 public const CONTEXT_LDAP = 4;
28 public const CONTEXT_SHIB = 6;
29
30 private static ?ilUserCreationContext $instance = null;
31 private array $contexts = []; // Missing array type.
32
33 protected function __construct()
34 {
35 }
36
37 public static function getInstance(): self
38 {
39 if (!self::$instance) {
40 self::$instance = new self();
41 }
42 return self::$instance;
43 }
44
45 public function getValidContexts(): array // Missing array type.
46 {
47 return [
53 ];
54 }
55
56 public function getCurrentContexts(): array // Missing array type.
57 {
58 return $this->contexts;
59 }
60
61 public function addContext(int $a_context): void
62 {
63 if (in_array($a_context, $this->getValidContexts())) {
64 if (!in_array($a_context, $this->getCurrentContexts())) {
65 $this->contexts[] = $a_context;
66 }
67 }
68 }
69}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static ilUserCreationContext $instance