ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilTestProcessLocker.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
27abstract class ilTestProcessLocker
28{
32 protected function executeOperation(callable $operation)
33 {
34 $operation();
35 }
36
40 final public function executeTestStartLockOperation(callable $operation)
41 {
43 $this->executeOperation($operation);
45 }
46
51 {
52 }
53
58 {
59 }
60
65 final public function executeRandomPassBuildOperation(callable $operation, $withTaxonomyTables = false)
66 {
67 $this->onBeforeExecutingRandomPassBuildOperation($withTaxonomyTables);
68 $this->executeOperation($operation);
69 $this->onAfterExecutingRandomPassBuildOperation($withTaxonomyTables);
70 }
71
75 protected function onBeforeExecutingRandomPassBuildOperation($withTaxonomyTables = false)
76 {
77 }
78
82 protected function onAfterExecutingRandomPassBuildOperation($withTaxonomyTables = false)
83 {
84 }
85
86
90 final public function executeTestFinishOperation(callable $operation)
91 {
93 $this->executeOperation($operation);
95 }
96
97 final public function executeNamedOperation(string $operationDescriptor, callable $operation): void
98 {
99 $this->onBeforeExecutingNamedOperation($operationDescriptor);
100 $this->executeOperation($operation);
101 $this->onAfterExecutingNamedOperation($operationDescriptor);
102 }
103
108 {
109 }
110
115 {
116 }
117
118 protected function onBeforeExecutingNamedOperation(string $operationDescriptor): void
119 {
120 }
121
122 protected function onAfterExecutingNamedOperation(string $operationDescriptor): void
123 {
124 }
125}
executeOperation(callable $operation)
onBeforeExecutingRandomPassBuildOperation($withTaxonomyTables=false)
executeNamedOperation(string $operationDescriptor, callable $operation)
executeTestFinishOperation(callable $operation)
onAfterExecutingRandomPassBuildOperation($withTaxonomyTables=false)
onAfterExecutingNamedOperation(string $operationDescriptor)
executeTestStartLockOperation(callable $operation)
executeRandomPassBuildOperation(callable $operation, $withTaxonomyTables=false)
onBeforeExecutingNamedOperation(string $operationDescriptor)