ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTestProcessLockerDb Class Reference
+ Inheritance diagram for ilTestProcessLockerDb:
+ Collaboration diagram for ilTestProcessLockerDb:

Public Member Functions

 __construct (ilDBInterface $db)
 
- Public Member Functions inherited from ilTestProcessLocker
 executeTestStartLockOperation (callable $operation)
 
 executeRandomPassBuildOperation (callable $operation, $withTaxonomyTables=false)
 
 executeTestFinishOperation (callable $operation)
 
 executeNamedOperation (string $operationDescriptor, callable $operation)
 

Protected Member Functions

 onBeforeExecutingTestStartOperation ()
 {} More...
 
 onBeforeExecutingRandomPassBuildOperation ($withTaxonomyTables=false)
 {} More...
 
 onBeforeExecutingTestFinishOperation ()
 {} More...
 
 executeOperation (callable $operation)
 {} More...
 
 onBeforeExecutingNamedOperation (string $operationDescriptor)
 
 onAfterExecutingNamedOperation (string $operationDescriptor)
 
- Protected Member Functions inherited from ilTestProcessLocker
 executeOperation (callable $operation)
 
 onBeforeExecutingTestStartOperation ()
 
 onAfterExecutingTestStartOperation ()
 
 onBeforeExecutingRandomPassBuildOperation ($withTaxonomyTables=false)
 
 onAfterExecutingRandomPassBuildOperation ($withTaxonomyTables=false)
 
 onBeforeExecutingTestFinishOperation ()
 
 onAfterExecutingTestFinishOperation ()
 
 onBeforeExecutingNamedOperation (string $operationDescriptor)
 
 onAfterExecutingNamedOperation (string $operationDescriptor)
 

Protected Attributes

 $db
 
 $atom_query
 

Detailed Description

Definition at line 25 of file class.ilTestProcessLockerDb.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestProcessLockerDb::__construct ( ilDBInterface  $db)
Parameters
ilDBInterface$db

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

References $db.

41  {
42  $this->db = $db;
43  $this->atom_query = $this->db->buildAtomQuery();
44  }

Member Function Documentation

◆ executeOperation()

ilTestProcessLockerDb::executeOperation ( callable  $operation)
protected

{}

Definition at line 84 of file class.ilTestProcessLockerDb.php.

References $ilDB.

85  {
86  $this->atom_query ->addQueryCallable(function (ilDBInterface $ilDB) use ($operation) {
87  $operation();
88  });
89  $this->atom_query->run();
90  }

◆ onAfterExecutingNamedOperation()

ilTestProcessLockerDb::onAfterExecutingNamedOperation ( string  $operationDescriptor)
protected

Definition at line 97 of file class.ilTestProcessLockerDb.php.

97  : void
98  {
99  throw new RuntimeException('Operation not supported');
100  }

◆ onBeforeExecutingNamedOperation()

ilTestProcessLockerDb::onBeforeExecutingNamedOperation ( string  $operationDescriptor)
protected

Definition at line 92 of file class.ilTestProcessLockerDb.php.

92  : void
93  {
94  throw new RuntimeException('Operation not supported');
95  }

◆ onBeforeExecutingRandomPassBuildOperation()

ilTestProcessLockerDb::onBeforeExecutingRandomPassBuildOperation (   $withTaxonomyTables = false)
protected

{}

Definition at line 57 of file class.ilTestProcessLockerDb.php.

58  {
59  $this->atom_query->addTableLock('tst_rnd_cpy');
60  $this->atom_query->addTableLock('qpl_questions');
61  $this->atom_query->addTableLock('qpl_qst_type');
62  $this->atom_query->addTableLock('tst_test_rnd_qst')->lockSequence(true);
63  $this->atom_query->addTableLock('il_plugin');
64  $this->atom_query->addTableLock('tst_active');
65 
66  if ($withTaxonomyTables) {
67  $this->atom_query->addTableLock('tax_tree')->aliasName('s');
68  $this->atom_query->addTableLock('tax_tree')->aliasName('t');
69  $this->atom_query->addTableLock('tax_node_assignment');
70  }
71  }

◆ onBeforeExecutingTestFinishOperation()

ilTestProcessLockerDb::onBeforeExecutingTestFinishOperation ( )
protected

{}

Definition at line 76 of file class.ilTestProcessLockerDb.php.

77  {
78  $this->atom_query->addTableLock('tst_active');
79  }

◆ onBeforeExecutingTestStartOperation()

ilTestProcessLockerDb::onBeforeExecutingTestStartOperation ( )
protected

{}

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

50  {
51  $this->atom_query->addTableLock('tst_active');
52  }

Field Documentation

◆ $atom_query

ilTestProcessLockerDb::$atom_query
protected

Definition at line 35 of file class.ilTestProcessLockerDb.php.

◆ $db

ilTestProcessLockerDb::$db
protected

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

Referenced by __construct().


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