ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilUserCreationContext.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
13 {
16  const CONTEXT_SOAP = 3;
17  const CONTEXT_LDAP = 4;
18  const CONTEXT_RADIUS = 5;
19  const CONTEXT_SHIB = 6;
20 
21 
22  private static $instance = null;
23 
24  private $contexts = array();
25 
29  protected function __construct()
30  {
31  }
32 
37  public static function getInstance()
38  {
39  if (!self::$instance) {
40  self::$instance = new self();
41  }
42  return self::$instance;
43  }
44 
48  public function getValidContexts()
49  {
50  return array(
51  self::CONTEXT_REGISTRATION,
52  self::CONTEXT_ADMINISTRATION,
53  self::CONTEXT_SOAP,
54  self::CONTEXT_LDAP,
55  self::CONTEXT_RADIUS,
56  self::CONTEXT_SHIB
57  );
58  }
59 
64  public function getCurrentContexts()
65  {
66  return $this->contexts;
67  }
68 
73  public function addContext($a_context)
74  {
75  if (in_array($a_context, $this->getValidContexts())) {
76  if (!in_array($a_context, $this->getCurrentContexts())) {
77  $this->contexts[] = $a_context;
78  }
79  }
80  }
81 }
static getInstance()
Get instance.
addContext($a_context)
Add context.
__construct()
Default constructor.
Create styles array
The data for the language used.