ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 }
33
38 public static function getInstance()
39 {
40 if(!self::$instance)
41 {
42 self::$instance = new self();
43 }
44 return self::$instance;
45 }
46
50 public function getValidContexts()
51 {
52 return array(
53 self::CONTEXT_REGISTRATION,
54 self::CONTEXT_ADMINISTRATION,
55 self::CONTEXT_SOAP,
56 self::CONTEXT_LDAP,
57 self::CONTEXT_RADIUS,
58 self::CONTEXT_SHIB
59 );
60 }
61
66 public function getCurrentContexts()
67 {
68 return $this->contexts;
69 }
70
75 public function addContext($a_context)
76 {
77 if(in_array($a_context, $this->getValidContexts()))
78 {
79 if(!in_array($a_context, $this->getCurrentContexts()))
80 {
81 $this->contexts[] = $a_context;
82 }
83 }
84 }
85
86}
87?>
addContext($a_context)
Add context.
static getInstance()
Get instance.
__construct()
Default constructor.