ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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

◆ __construct()

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

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

38 {
39 $this->settings = $settings;
40 $this->db = $db;
41
42 $this->activeId = null;
43 }

References $db, and $settings.

Member Function Documentation

◆ getActiveId()

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:

◆ getLocker()

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

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

70 {
71 switch( $this->getLockModeSettingValue() )
72 {
74
75 $locker = new ilTestProcessLockerNone();
76 break;
77
79
80 require_once 'Modules/Test/classes/class.ilTestProcessLockFileStorage.php';
81 $storage = new ilTestProcessLockFileStorage($this->getActiveId());
82 $storage->create();
83
84 $locker = new ilTestProcessLockerFile($storage);
85 break;
86
88
89 $locker = new ilTestProcessLockerDb($this->db);
90 break;
91 }
92
93 return $locker;
94 }

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

+ Here is the call graph for this function:

◆ getLockModeSettingValue()

ilTestProcessLockerFactory::getLockModeSettingValue ( )
private

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

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

References ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_NONE.

Referenced by getLocker().

+ Here is the caller graph for this function:

◆ setActiveId()

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

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

49 {
50 $this->activeId = $activeId;
51 }

References $activeId.

Field Documentation

◆ $activeId

ilTestProcessLockerFactory::$activeId
protected

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

Referenced by getActiveId(), and setActiveId().

◆ $db

ilTestProcessLockerFactory::$db
protected

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

Referenced by __construct().

◆ $settings

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: