ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilTestProcessLocker.php
Go to the documentation of this file.
1 <?php
2 
25 abstract class ilTestProcessLocker
26 {
30  protected function executeOperation(callable $operation)
31  {
32  $operation();
33  }
34 
38  final public function executeTestStartLockOperation(callable $operation)
39  {
41  $this->executeOperation($operation);
43  }
44 
49  {
50  }
51 
56  {
57  }
58 
63  final public function executeRandomPassBuildOperation(callable $operation, $withTaxonomyTables = false)
64  {
65  $this->onBeforeExecutingRandomPassBuildOperation($withTaxonomyTables);
66  $this->executeOperation($operation);
67  $this->onAfterExecutingRandomPassBuildOperation($withTaxonomyTables);
68  }
69 
73  protected function onBeforeExecutingRandomPassBuildOperation($withTaxonomyTables = false)
74  {
75  }
76 
80  protected function onAfterExecutingRandomPassBuildOperation($withTaxonomyTables = false)
81  {
82  }
83 
84 
88  final public function executeTestFinishOperation(callable $operation)
89  {
91  $this->executeOperation($operation);
93  }
94 
95  final public function executeNamedOperation(string $operationDescriptor, callable $operation): void
96  {
97  $this->onBeforeExecutingNamedOperation($operationDescriptor);
98  $this->executeOperation($operation);
99  $this->onAfterExecutingNamedOperation($operationDescriptor);
100  }
101 
106  {
107  }
108 
113  {
114  }
115 
116  protected function onBeforeExecutingNamedOperation(string $operationDescriptor): void
117  {
118  }
119 
120  protected function onAfterExecutingNamedOperation(string $operationDescriptor): void
121  {
122  }
123 }
onAfterExecutingNamedOperation(string $operationDescriptor)
onAfterExecutingRandomPassBuildOperation($withTaxonomyTables=false)
executeNamedOperation(string $operationDescriptor, callable $operation)
executeTestFinishOperation(callable $operation)
executeOperation(callable $operation)
onBeforeExecutingRandomPassBuildOperation($withTaxonomyTables=false)
onBeforeExecutingNamedOperation(string $operationDescriptor)
executeTestStartLockOperation(callable $operation)
executeRandomPassBuildOperation(callable $operation, $withTaxonomyTables=false)