ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilTestProcessLockerFactory Class Reference
+ Collaboration diagram for ilTestProcessLockerFactory:

Public Member Functions

 __construct (ilSetting $settings, ilDBInterface $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,
ilDBInterface  $db 
)
Parameters
ilSetting$settings
ilDBInterface$db

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

References $db, $settings, and settings().

38  {
39  $this->settings = $settings;
40  $this->db = $db;
41 
42  $this->activeId = null;
43  }
settings()
Definition: settings.php:2
+ Here is the call graph for this function:

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.

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

70  {
71  switch ($this->getLockModeSettingValue()) {
73 
74  $locker = new ilTestProcessLockerNone();
75  break;
76 
78 
79  require_once 'Modules/Test/classes/class.ilTestProcessLockFileStorage.php';
80  $storage = new ilTestProcessLockFileStorage($this->getActiveId());
81  $storage->create();
82 
83  $locker = new ilTestProcessLockerFile($storage);
84  break;
85 
87 
88  $locker = new ilTestProcessLockerDb($this->db);
89  break;
90  }
91 
92  return $locker;
93  }
+ Here is the call graph for this function:

◆ getLockModeSettingValue()

ilTestProcessLockerFactory::getLockModeSettingValue ( )
private

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

References ilObjAssessmentFolder\ASS_PROC_LOCK_MODE_NONE, and settings().

Referenced by getLocker().

62  {
63  return $this->settings->get('ass_process_lock_mode', ilObjAssessmentFolder::ASS_PROC_LOCK_MODE_NONE);
64  }
settings()
Definition: settings.php:2
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setActiveId()

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

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

References $activeId.

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

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: