ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilCASSettings Class Reference
+ Collaboration diagram for ilCASSettings:

Public Member Functions

 setServer (string $a_server)
 
 getServer ()
 
 setPort (int $a_port)
 
 getPort ()
 
 setUri (string $a_uri)
 
 getUri ()
 
 setLoginInstruction (string $a_inst)
 
 getLoginInstruction ()
 
 setActive ($a_active)
 
 isActive ()
 
 enableUserCreation ($a_uc)
 
 isUserCreationEnabled ()
 
 enableLocalAuthentication ($a_local)
 
 isLocalAuthenticationEnabled ()
 
 setDefaultRole ($a_role)
 
 getDefaultRole ()
 
 save ()
 

Static Public Member Functions

static getInstance ()
 Get singleton instance. More...
 

Data Fields

const SYNC_DISABLED = 0
 
const SYNC_CAS = 1
 
const SYNC_LDAP = 2
 

Protected Member Functions

 __construct ()
 Singleton constructor. More...
 

Private Member Functions

 read ()
 
 getStorage ()
 

Private Attributes

ilSetting $storage
 
string $server = ''
 
int $port = 0
 
string $uri = ''
 
string $login_instructions = ''
 
bool $active = false
 
bool $create_users = false
 
bool $allow_local = false
 
int $user_default_role = 0
 
int $default_role = 0
 

Static Private Attributes

static ilCASSettings $instance = null
 

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 24 of file class.ilCASSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilCASSettings::__construct ( )
protected

Singleton constructor.

Definition at line 46 of file class.ilCASSettings.php.

References $DIC, and read().

47  {
48  global $DIC;
49 
50  $this->storage = $DIC->settings();
51  $this->read();
52  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Member Function Documentation

◆ enableLocalAuthentication()

ilCASSettings::enableLocalAuthentication (   $a_local)

Definition at line 125 of file class.ilCASSettings.php.

Referenced by read().

125  : void
126  {
127  $this->allow_local = $a_local;
128  }
+ Here is the caller graph for this function:

◆ enableUserCreation()

ilCASSettings::enableUserCreation (   $a_uc)

Definition at line 115 of file class.ilCASSettings.php.

Referenced by read().

115  : void
116  {
117  $this->create_users = $a_uc;
118  }
+ Here is the caller graph for this function:

◆ getDefaultRole()

ilCASSettings::getDefaultRole ( )

Definition at line 140 of file class.ilCASSettings.php.

References $default_role.

Referenced by save().

140  : int
141  {
142  return $this->default_role;
143  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilCASSettings::getInstance ( )
static

Get singleton instance.

Definition at line 57 of file class.ilCASSettings.php.

Referenced by ilAuthProviderCAS\__construct(), ilCASSettingsGUI\__construct(), and ilCASSettingsTest\setGlobalVariable().

58  {
59  if (self::$instance) {
60  return self::$instance;
61  }
62  return self::$instance = new ilCASSettings();
63  }
+ Here is the caller graph for this function:

◆ getLoginInstruction()

ilCASSettings::getLoginInstruction ( )

Definition at line 100 of file class.ilCASSettings.php.

References $login_instructions.

Referenced by save().

100  : string
101  {
103  }
+ Here is the caller graph for this function:

◆ getPort()

ilCASSettings::getPort ( )

Definition at line 80 of file class.ilCASSettings.php.

References $port.

Referenced by save().

80  : int
81  {
82  return $this->port;
83  }
+ Here is the caller graph for this function:

◆ getServer()

ilCASSettings::getServer ( )

Definition at line 70 of file class.ilCASSettings.php.

References $server.

Referenced by save().

70  : string
71  {
72  return $this->server;
73  }
+ Here is the caller graph for this function:

◆ getStorage()

ilCASSettings::getStorage ( )
private

Definition at line 169 of file class.ilCASSettings.php.

References $storage.

Referenced by read(), and save().

169  : ilSetting
170  {
171  return $this->storage;
172  }
+ Here is the caller graph for this function:

◆ getUri()

ilCASSettings::getUri ( )

Definition at line 90 of file class.ilCASSettings.php.

References $uri.

Referenced by save().

90  : string
91  {
92  return $this->uri;
93  }
+ Here is the caller graph for this function:

◆ isActive()

ilCASSettings::isActive ( )

Definition at line 110 of file class.ilCASSettings.php.

References $active.

Referenced by save().

110  : bool
111  {
112  return $this->active;
113  }
+ Here is the caller graph for this function:

◆ isLocalAuthenticationEnabled()

ilCASSettings::isLocalAuthenticationEnabled ( )

Definition at line 130 of file class.ilCASSettings.php.

References $allow_local.

Referenced by save().

130  : bool
131  {
132  return $this->allow_local;
133  }
+ Here is the caller graph for this function:

◆ isUserCreationEnabled()

ilCASSettings::isUserCreationEnabled ( )

Definition at line 120 of file class.ilCASSettings.php.

References $create_users.

Referenced by save().

120  : bool
121  {
122  return $this->create_users;
123  }
+ Here is the caller graph for this function:

◆ read()

ilCASSettings::read ( )
private

Definition at line 157 of file class.ilCASSettings.php.

References enableLocalAuthentication(), enableUserCreation(), getStorage(), ILIAS\UI\examples\Progress\Bar\server(), setActive(), setDefaultRole(), setLoginInstruction(), setPort(), setServer(), and setUri().

Referenced by __construct().

157  : void
158  {
159  $this->setServer($this->getStorage()->get('cas_server', $this->server));
160  $this->setPort((int) $this->getStorage()->get('cas_port', (string) $this->port));
161  $this->setUri($this->getStorage()->get('cas_uri', $this->uri));
162  $this->setActive((bool) $this->getStorage()->get('cas_active', (string) $this->active));
163  $this->setDefaultRole((int) $this->getStorage()->get('cas_user_default_role', (string) $this->user_default_role));
164  $this->setLoginInstruction($this->getStorage()->get('cas_login_instructions', $this->login_instructions));
165  $this->enableLocalAuthentication((bool) $this->getStorage()->get('cas_allow_local', (string) $this->allow_local));
166  $this->enableUserCreation((bool) $this->getStorage()->get('cas_create_users', (string) $this->create_users));
167  }
server()
description: > This example shows how a Progress Bar can be rendered and updated by the server...
Definition: server.php:43
setLoginInstruction(string $a_inst)
enableLocalAuthentication($a_local)
setUri(string $a_uri)
setPort(int $a_port)
setServer(string $a_server)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilCASSettings::save ( )

Definition at line 145 of file class.ilCASSettings.php.

References getDefaultRole(), getLoginInstruction(), getPort(), getServer(), getStorage(), getUri(), isActive(), isLocalAuthenticationEnabled(), and isUserCreationEnabled().

145  : void
146  {
147  $this->getStorage()->set('cas_server', $this->getServer());
148  $this->getStorage()->set('cas_port', (string) $this->getPort());
149  $this->getStorage()->set('cas_uri', $this->getUri());
150  $this->getStorage()->set('cas_login_instructions', $this->getLoginInstruction());
151  $this->getStorage()->set('cas_active', (string) $this->isActive());
152  $this->getStorage()->set('cas_create_users', (string) $this->isUserCreationEnabled());
153  $this->getStorage()->set('cas_allow_local', (string) $this->isLocalAuthenticationEnabled());
154  $this->getStorage()->set('cas_user_default_role', (string) $this->getDefaultRole());
155  }
+ Here is the call graph for this function:

◆ setActive()

ilCASSettings::setActive (   $a_active)

Definition at line 105 of file class.ilCASSettings.php.

Referenced by read().

105  : void
106  {
107  $this->active = $a_active;
108  }
+ Here is the caller graph for this function:

◆ setDefaultRole()

ilCASSettings::setDefaultRole (   $a_role)

Definition at line 135 of file class.ilCASSettings.php.

Referenced by read().

135  : void
136  {
137  $this->default_role = $a_role;
138  }
+ Here is the caller graph for this function:

◆ setLoginInstruction()

ilCASSettings::setLoginInstruction ( string  $a_inst)

Definition at line 95 of file class.ilCASSettings.php.

Referenced by read().

95  : void
96  {
97  $this->login_instructions = $a_inst;
98  }
+ Here is the caller graph for this function:

◆ setPort()

ilCASSettings::setPort ( int  $a_port)

Definition at line 75 of file class.ilCASSettings.php.

Referenced by read().

75  : void
76  {
77  $this->port = $a_port;
78  }
+ Here is the caller graph for this function:

◆ setServer()

ilCASSettings::setServer ( string  $a_server)

Definition at line 65 of file class.ilCASSettings.php.

References ILIAS\UI\examples\Progress\Bar\server().

Referenced by read().

65  : void
66  {
67  $this->server = $a_server;
68  }
server()
description: > This example shows how a Progress Bar can be rendered and updated by the server...
Definition: server.php:43
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUri()

ilCASSettings::setUri ( string  $a_uri)

Definition at line 85 of file class.ilCASSettings.php.

Referenced by read().

85  : void
86  {
87  $this->uri = $a_uri;
88  }
+ Here is the caller graph for this function:

Field Documentation

◆ $active

bool ilCASSettings::$active = false
private

Definition at line 37 of file class.ilCASSettings.php.

Referenced by isActive().

◆ $allow_local

bool ilCASSettings::$allow_local = false
private

Definition at line 39 of file class.ilCASSettings.php.

Referenced by isLocalAuthenticationEnabled().

◆ $create_users

bool ilCASSettings::$create_users = false
private

Definition at line 38 of file class.ilCASSettings.php.

Referenced by isUserCreationEnabled().

◆ $default_role

int ilCASSettings::$default_role = 0
private

Definition at line 41 of file class.ilCASSettings.php.

Referenced by getDefaultRole().

◆ $instance

ilCASSettings ilCASSettings::$instance = null
staticprivate

Definition at line 30 of file class.ilCASSettings.php.

◆ $login_instructions

string ilCASSettings::$login_instructions = ''
private

Definition at line 36 of file class.ilCASSettings.php.

Referenced by getLoginInstruction().

◆ $port

int ilCASSettings::$port = 0
private

Definition at line 34 of file class.ilCASSettings.php.

Referenced by getPort().

◆ $server

string ilCASSettings::$server = ''
private

Definition at line 33 of file class.ilCASSettings.php.

Referenced by getServer().

◆ $storage

ilSetting ilCASSettings::$storage
private

Definition at line 32 of file class.ilCASSettings.php.

Referenced by getStorage().

◆ $uri

string ilCASSettings::$uri = ''
private

Definition at line 35 of file class.ilCASSettings.php.

Referenced by getUri().

◆ $user_default_role

int ilCASSettings::$user_default_role = 0
private

Definition at line 40 of file class.ilCASSettings.php.

◆ SYNC_CAS

const ilCASSettings::SYNC_CAS = 1

◆ SYNC_DISABLED

const ilCASSettings::SYNC_DISABLED = 0

◆ SYNC_LDAP

const ilCASSettings::SYNC_LDAP = 2

The documentation for this class was generated from the following file: