ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilOpenIdSettings Class Reference

Stores OpenId related settings More...

+ Collaboration diagram for ilOpenIdSettings:

Public Member Functions

 isActive ()
 Is open id auth active.
 setActive ($a_status)
 Set open id active.
 forcedProviderSelection ()
 is provider selection forced
 forceProviderSelection ($a_status)
 Set force selection status.
 isCreationEnabled ()
 Is account creation enabled.
 enableCreation ($a_status)
 Enable account creation.
 isAccountMigrationEnabled ()
 Is account migration enabled.
 enableAccountMigration ($a_status)
 Enable account migration.
 getDefaultRole ()
 Get default role.
 setDefaultRole ($a_role)
 Set default role.
 update ()
 Update settings.
 getConsumer ()
 Get open id consumer.
 getReturnLocation ()
 Get oid return location.
 initConsumer ()

Static Public Member Functions

static getInstance ()
 Get singleton instance.

Protected Member Functions

 read ()
 Read settings from db.
 initTempDir ()
 Init Temp directory.

Private Member Functions

 __construct ()
 Singleton constructor.

Private Attributes

 $storage = null
 $active = false
 $account_migration = false
 $default_role = 0
 $creation = false
 $forced_selection = false
 $consumer = null

Static Private Attributes

static $instance = null

Detailed Description

Stores OpenId related settings

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

Definition at line 13 of file class.ilOpenIdSettings.php.

Constructor & Destructor Documentation

ilOpenIdSettings::__construct ( )
private

Singleton constructor.

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

References read().

{
$this->storage = new ilSetting('auth_openid');
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

ilOpenIdSettings::enableAccountMigration (   $a_status)

Enable account migration.

Parameters
bool$a_status
Returns

Definition at line 121 of file class.ilOpenIdSettings.php.

Referenced by read().

{
$this->account_migration = $a_status;
}

+ Here is the caller graph for this function:

ilOpenIdSettings::enableCreation (   $a_status)

Enable account creation.

Parameters
bool$a_status
Returns

Definition at line 102 of file class.ilOpenIdSettings.php.

Referenced by read().

{
$this->creation = $a_status;
}

+ Here is the caller graph for this function:

ilOpenIdSettings::forcedProviderSelection ( )

is provider selection forced

Returns

Definition at line 73 of file class.ilOpenIdSettings.php.

References $forced_selection.

Referenced by update().

+ Here is the caller graph for this function:

ilOpenIdSettings::forceProviderSelection (   $a_status)

Set force selection status.

Parameters
bool$a_status
Returns

Definition at line 83 of file class.ilOpenIdSettings.php.

Referenced by read().

{
$this->forced_selection = $a_status;
}

+ Here is the caller graph for this function:

ilOpenIdSettings::getConsumer ( )

Get open id consumer.

Returns

Definition at line 175 of file class.ilOpenIdSettings.php.

References $consumer.

{
}
ilOpenIdSettings::getDefaultRole ( )

Get default role.

Returns

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

References $default_role.

Referenced by update().

{
}

+ Here is the caller graph for this function:

static ilOpenIdSettings::getInstance ( )
static
ilOpenIdSettings::getReturnLocation ( )

Get oid return location.

Returns

Definition at line 184 of file class.ilOpenIdSettings.php.

References $ilCtrl.

{
global $ilCtrl;
$ilCtrl->setTargetScript('ilias.php');
$ilCtrl->setParameterByClass('ilstartupgui','oid_check_status',1);
$redir = ILIAS_HTTP_PATH.'/';
$redir .= $ilCtrl->getLinkTargetByClass('ilstartupgui','showLogin','',false,false);
return $redir;
}
ilOpenIdSettings::initConsumer ( )

Definition at line 208 of file class.ilOpenIdSettings.php.

References ilUtil\getDataDir(), and initTempDir().

{
include_once "Auth/OpenID/Consumer.php";
include_once "Auth/OpenID/FileStore.php";
include_once 'Auth/OpenID/DumbStore.php';
if(is_object($this->consumer))
{
return true;
}
$this->initTempDir();
$store = new Auth_OpenID_FileStore(ilUtil::getDataDir().DIRECTORY_SEPARATOR.'tmp');
return $this->consumer = new Auth_OpenID_Consumer($store);
}

+ Here is the call graph for this function:

ilOpenIdSettings::initTempDir ( )
protected

Init Temp directory.

Returns

Definition at line 199 of file class.ilOpenIdSettings.php.

References ilUtil\getDataDir(), and ilUtil\makeDir().

Referenced by initConsumer().

{
if(!file_exists(ilUtil::getDataDir().DIRECTORY_SEPARATOR.'tmp'))
{
ilUtil::makeDir(ilUtil::getDataDir().DIRECTORY_SEPARATOR.'tmp');
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilOpenIdSettings::isAccountMigrationEnabled ( )

Is account migration enabled.

Returns

Definition at line 111 of file class.ilOpenIdSettings.php.

References $account_migration.

Referenced by update().

{
return (bool) $this->account_migration;
}

+ Here is the caller graph for this function:

ilOpenIdSettings::isActive ( )

Is open id auth active.

Returns

Definition at line 54 of file class.ilOpenIdSettings.php.

References $active.

Referenced by update().

{
return (bool) $this->active;
}

+ Here is the caller graph for this function:

ilOpenIdSettings::isCreationEnabled ( )

Is account creation enabled.

Returns

Definition at line 92 of file class.ilOpenIdSettings.php.

References $creation.

Referenced by update().

{
return (bool) $this->creation;
}

+ Here is the caller graph for this function:

ilOpenIdSettings::read ( )
protected

Read settings from db.

Returns

Definition at line 149 of file class.ilOpenIdSettings.php.

References enableAccountMigration(), enableCreation(), forceProviderSelection(), setActive(), and setDefaultRole().

Referenced by __construct().

{
$this->setActive($this->storage->get('active',false));
$this->enableCreation($this->storage->get('creation',false));
$this->setDefaultRole($this->storage->get('default_role',0));
$this->enableAccountMigration($this->storage->get('account_migration',false));
$this->forceProviderSelection($this->storage->get('forced_selection',false));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilOpenIdSettings::setActive (   $a_status)

Set open id active.

Parameters
bool$a_status
Returns

Definition at line 64 of file class.ilOpenIdSettings.php.

Referenced by read().

{
$this->active = $a_status;
}

+ Here is the caller graph for this function:

ilOpenIdSettings::setDefaultRole (   $a_role)

Set default role.

Parameters
int$a_role
Returns

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

Referenced by read().

{
$this->default_role = $a_role;
}

+ Here is the caller graph for this function:

ilOpenIdSettings::update ( )

Update settings.

Returns

Definition at line 162 of file class.ilOpenIdSettings.php.

References forcedProviderSelection(), getDefaultRole(), isAccountMigrationEnabled(), isActive(), and isCreationEnabled().

{
$this->storage->set('active', (int) $this->isActive());
$this->storage->set('creation',(int) $this->isCreationEnabled());
$this->storage->set('default_role',(int) $this->getDefaultRole());
$this->storage->set('account_migration',(int) $this->isAccountMigrationEnabled());
$this->storage->set('forced_selection',(int) $this->forcedProviderSelection());
}

+ Here is the call graph for this function:

Field Documentation

ilOpenIdSettings::$account_migration = false
private

Definition at line 20 of file class.ilOpenIdSettings.php.

Referenced by isAccountMigrationEnabled().

ilOpenIdSettings::$active = false
private

Definition at line 19 of file class.ilOpenIdSettings.php.

Referenced by isActive().

ilOpenIdSettings::$consumer = null
private

Definition at line 25 of file class.ilOpenIdSettings.php.

Referenced by getConsumer().

ilOpenIdSettings::$creation = false
private

Definition at line 22 of file class.ilOpenIdSettings.php.

Referenced by isCreationEnabled().

ilOpenIdSettings::$default_role = 0
private

Definition at line 21 of file class.ilOpenIdSettings.php.

Referenced by getDefaultRole().

ilOpenIdSettings::$forced_selection = false
private

Definition at line 23 of file class.ilOpenIdSettings.php.

Referenced by forcedProviderSelection().

ilOpenIdSettings::$instance = null
staticprivate

Definition at line 15 of file class.ilOpenIdSettings.php.

Referenced by getInstance().

ilOpenIdSettings::$storage = null
private

Definition at line 17 of file class.ilOpenIdSettings.php.


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