ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilAssQuestionProcessLockerFactory Class Reference
+ Collaboration diagram for ilAssQuestionProcessLockerFactory:

Public Member Functions

 __construct (private readonly ilSetting $settings, private readonly ilDBInterface $db, private readonly ilLogger|TestLogger $logger)
 
 setQuestionId (int $question_id)
 
 getQuestionId ()
 
 setUserId (int $user_id)
 
 getUserId ()
 
 getLocker ()
 

Protected Attributes

int $question_id = null
 
int $user_id = null
 

Private Member Functions

 getLockModeSettingValue ()
 

Detailed Description

Definition at line 27 of file class.ilAssQuestionProcessLockerFactory.php.

Constructor & Destructor Documentation

◆ __construct()

ilAssQuestionProcessLockerFactory::__construct ( private readonly ilSetting  $settings,
private readonly ilDBInterface  $db,
private readonly ilLogger|TestLogger  $logger 
)

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

36 {
37 }

Member Function Documentation

◆ getLocker()

ilAssQuestionProcessLockerFactory::getLocker ( )

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

65 {
66 switch ($this->getLockModeSettingValue()) {
69
71 $storage = new ilAssQuestionProcessLockFileStorage($this->getQuestionId(), $this->getUserId());
72 $storage->create();
73 return new ilAssQuestionProcessLockerFile($storage, $this->logger);
74
76 return new ilAssQuestionProcessLockerDb($this->db);
77 }
78 }
const ASS_PROC_LOCK_MODE_NONE
const ASS_PROC_LOCK_MODE_FILE

References ilObjTestFolder\ASS_PROC_LOCK_MODE_DB, ilObjTestFolder\ASS_PROC_LOCK_MODE_FILE, ilObjTestFolder\ASS_PROC_LOCK_MODE_NONE, getLockModeSettingValue(), getQuestionId(), getUserId(), and ILIAS\Repository\logger().

+ Here is the call graph for this function:

◆ getLockModeSettingValue()

ilAssQuestionProcessLockerFactory::getLockModeSettingValue ( )
private

Definition at line 59 of file class.ilAssQuestionProcessLockerFactory.php.

59 : ?string
60 {
61 return $this->settings->get('ass_process_lock_mode', ilObjTestFolder::ASS_PROC_LOCK_MODE_NONE);
62 }

References ilObjTestFolder\ASS_PROC_LOCK_MODE_NONE, and ILIAS\Repository\settings().

Referenced by getLocker().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionId()

ilAssQuestionProcessLockerFactory::getQuestionId ( )

Definition at line 44 of file class.ilAssQuestionProcessLockerFactory.php.

References $question_id.

Referenced by getLocker().

+ Here is the caller graph for this function:

◆ getUserId()

ilAssQuestionProcessLockerFactory::getUserId ( )

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

References $user_id.

Referenced by getLocker().

+ Here is the caller graph for this function:

◆ setQuestionId()

ilAssQuestionProcessLockerFactory::setQuestionId ( int  $question_id)

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

39 : void
40 {
41 $this->question_id = $question_id;
42 }

References $question_id.

◆ setUserId()

ilAssQuestionProcessLockerFactory::setUserId ( int  $user_id)

Definition at line 49 of file class.ilAssQuestionProcessLockerFactory.php.

49 : void
50 {
51 $this->user_id = $user_id;
52 }

References $user_id.

Field Documentation

◆ $question_id

int ilAssQuestionProcessLockerFactory::$question_id = null
protected

Definition at line 29 of file class.ilAssQuestionProcessLockerFactory.php.

Referenced by getQuestionId(), and setQuestionId().

◆ $user_id

int ilAssQuestionProcessLockerFactory::$user_id = null
protected

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

Referenced by getUserId(), and setUserId().


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