ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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)
 {} More...
 
 onBeforeExecutingTestFinishOperation ()
 {} More...
 
 executeOperation (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.

References $db.

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

Member Function Documentation

◆ executeOperation()

ilTestProcessLockerDb::executeOperation ( callable  $operation)
protected

{}

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

References $ilDB.

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

◆ onBeforeExecutingRandomPassBuildOperation()

ilTestProcessLockerDb::onBeforeExecutingRandomPassBuildOperation (   $withTaxonomyTables = false)
protected

{}

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  {
55  $this->atom_query->addTableLock('tax_tree')->aliasName('s');
56  $this->atom_query->addTableLock('tax_tree')->aliasName('t');
57  $this->atom_query->addTableLock('tax_node_assignment');
58  }
59  }

◆ onBeforeExecutingTestFinishOperation()

ilTestProcessLockerDb::onBeforeExecutingTestFinishOperation ( )
protected

{}

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

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

◆ onBeforeExecutingTestStartOperation()

ilTestProcessLockerDb::onBeforeExecutingTestStartOperation ( )
protected

{}

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: