ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestProcessLockerFactory Class Reference
+ Collaboration diagram for ilTestProcessLockerFactory:

Public Member Functions

 __construct (ilSetting $settings, ilDB $db)
 setActiveId ($activeId)
 getActiveId ()
 getLocker ()

Protected Attributes

 $settings
 $db
 $activeId

Private Member Functions

 getLockModeSettingValue ()

Detailed Description

Definition at line 16 of file class.ilTestProcessLockerFactory.php.

Constructor & Destructor Documentation

ilTestProcessLockerFactory::__construct ( ilSetting  $settings,
ilDB  $db 
)
Parameters
ilSetting$settings
ilDB$db

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

References $db, and $settings.

{
$this->settings = $settings;
$this->db = $db;
$this->activeId = null;
}

Member Function Documentation

ilTestProcessLockerFactory::getActiveId ( )
Returns
int

Definition at line 56 of file class.ilTestProcessLockerFactory.php.

References $activeId.

Referenced by getLocker().

{
}

+ Here is the caller graph for this function:

ilTestProcessLockerFactory::getLocker ( )
Returns
ilTestProcessLockerDb|ilTestProcessLockerFile|ilTestProcessLockerNone

Definition at line 69 of file class.ilTestProcessLockerFactory.php.

References ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_DB, ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_FILE, ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_NONE, getActiveId(), and getLockModeSettingValue().

{
switch( $this->getLockModeSettingValue() )
{
$locker = new ilTestProcessLockerNone();
break;
require_once 'Modules/Test/classes/class.ilTestProcessLockFileStorage.php';
$storage = new ilTestProcessLockFileStorage($this->getActiveId());
$storage->create();
$locker = new ilTestProcessLockerFile($storage);
break;
$locker = new ilTestProcessLockerDb($this->db);
break;
}
return $locker;
}

+ Here is the call graph for this function:

ilTestProcessLockerFactory::getLockModeSettingValue ( )
private

Definition at line 61 of file class.ilTestProcessLockerFactory.php.

References ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_NONE.

Referenced by getLocker().

{
return $this->settings->get('ass_process_lock_mode', ilObjAssessmentFolder::ASS_PROC_LOCK_MODE_NONE);
}

+ Here is the caller graph for this function:

ilTestProcessLockerFactory::setActiveId (   $activeId)
Parameters
int$activeId

Definition at line 48 of file class.ilTestProcessLockerFactory.php.

References $activeId.

{
$this->activeId = $activeId;
}

Field Documentation

ilTestProcessLockerFactory::$activeId
protected

Definition at line 31 of file class.ilTestProcessLockerFactory.php.

Referenced by getActiveId(), and setActiveId().

ilTestProcessLockerFactory::$db
protected

Definition at line 26 of file class.ilTestProcessLockerFactory.php.

Referenced by __construct().

ilTestProcessLockerFactory::$settings
protected

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

Referenced by __construct().


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