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

Public Member Functions

 __construct (private readonly ilSetting $settings, private readonly ilDBInterface $db, private readonly ilLogger|TestLogger $logger)
 
 getContextId ()
 
 withContextId (int $contextId)
 
 getLocker ()
 
 retrieveLockerForNamedOperation ()
 

Protected Attributes

int $context_id
 

Private Member Functions

 getLockModeSettingValue ()
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

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

37 {
38 }

Member Function Documentation

◆ getContextId()

ilTestProcessLockerFactory::getContextId ( )

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

References $context_id.

Referenced by getLocker().

+ Here is the caller graph for this function:

◆ getLocker()

ilTestProcessLockerFactory::getLocker ( )

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

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

Referenced by retrieveLockerForNamedOperation().

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

◆ getLockModeSettingValue()

ilTestProcessLockerFactory::getLockModeSettingValue ( )
private

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

53 : ?string
54 {
55 return $this->settings->get('ass_process_lock_mode', ilObjTestFolder::ASS_PROC_LOCK_MODE_NONE);
56 }

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:

◆ retrieveLockerForNamedOperation()

ilTestProcessLockerFactory::retrieveLockerForNamedOperation ( )

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

75 {
76 if ($this->getLocker() instanceof ilTestProcessLockerFile) {
77 return $this->getLocker();
78 }
79
80 return new ilTestProcessLockerNone();
81 }

References getLocker().

+ Here is the call graph for this function:

◆ withContextId()

ilTestProcessLockerFactory::withContextId ( int  $contextId)

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

45 : self
46 {
47 $clone = clone $this;
48 $clone->context_id = $contextId;
49
50 return $clone;
51 }

Field Documentation

◆ $context_id

int ilTestProcessLockerFactory::$context_id
protected

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

Referenced by getContextId().


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