ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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)
 

Protected Member Functions

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

Protected Attributes

 $db
 
 $atom_query
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

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

28 {
29 $this->db = $db;
30 $this->atom_query = $this->db->buildAtomQuery();
31 }

References $db.

Member Function Documentation

◆ executeOperation()

ilTestProcessLockerDb::executeOperation ( callable  $operation)
protected

{

Parameters
callable$operation
}

Reimplemented from ilTestProcessLocker.

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

72 {
73 $this->atom_query ->addQueryCallable(function (ilDBInterface $ilDB) use ($operation) {
74 $operation();
75 });
76 $this->atom_query->run();
77 }
Interface ilDBInterface.
global $ilDB

References $ilDB.

◆ onBeforeExecutingRandomPassBuildOperation()

ilTestProcessLockerDb::onBeforeExecutingRandomPassBuildOperation (   $withTaxonomyTables = false)
protected

{

Parameters
bool$withTaxonomyTables
}

Reimplemented from ilTestProcessLocker.

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

45 {
46 $this->atom_query->addTableLock('tst_rnd_cpy');
47 $this->atom_query->addTableLock('qpl_questions');
48 $this->atom_query->addTableLock('qpl_qst_type');
49 $this->atom_query->addTableLock('tst_test_rnd_qst')->lockSequence(true);
50 $this->atom_query->addTableLock('il_plugin');
51 $this->atom_query->addTableLock('tst_active');
52
53 if ($withTaxonomyTables) {
54 $this->atom_query->addTableLock('tax_tree')->aliasName('s');
55 $this->atom_query->addTableLock('tax_tree')->aliasName('t');
56 $this->atom_query->addTableLock('tax_node_assignment');
57 }
58 }

◆ onBeforeExecutingTestFinishOperation()

ilTestProcessLockerDb::onBeforeExecutingTestFinishOperation ( )
protected

{}

Reimplemented from ilTestProcessLocker.

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

64 {
65 $this->atom_query->addTableLock('tst_active');
66 }

◆ onBeforeExecutingTestStartOperation()

ilTestProcessLockerDb::onBeforeExecutingTestStartOperation ( )
protected

{}

Reimplemented from ilTestProcessLocker.

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

37 {
38 $this->atom_query->addTableLock('tst_active');
39 }

Field Documentation

◆ $atom_query

ilTestProcessLockerDb::$atom_query
protected

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

◆ $db

ilTestProcessLockerDb::$db
protected

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

Referenced by __construct().


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