Total Complexity | 6 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
5 | trait BaseHooksTrait { |
||
6 | protected $_hooks=[]; |
||
7 | |||
8 | /** |
||
9 | * @param string $hookKey |
||
10 | * @return boolean |
||
11 | */ |
||
12 | public function hookExists($hookKey){ |
||
14 | } |
||
15 | |||
16 | /** |
||
17 | * @param string $hookKey |
||
18 | * @return callable|NULL |
||
19 | */ |
||
20 | public function getHook($hookKey){ |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * Adds a new Hook |
||
29 | * @param String $hookKey |
||
30 | * @param callable $callable |
||
31 | */ |
||
32 | public function addHook($hookKey,$callable){ |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Executes the hook with key $hookKey |
||
38 | * @param string $hookKey |
||
39 | * @param mixed|null $variable |
||
40 | * @return void|mixed |
||
41 | */ |
||
42 | public function execHook($hookKey,$variable=null){ |
||
50 |