|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Velikonja\LabbyBundle; |
|
4
|
|
|
|
|
5
|
|
|
final class Events |
|
6
|
|
|
{ |
|
7
|
|
|
const PRE_SYNC = 'velikonja_labby.pre_sync'; |
|
8
|
|
|
const POST_SYNC = 'velikonja_labby.post_sync'; |
|
9
|
|
|
const PRE_SYNC_FS = 'velikonja_labby.pre_sync.fs'; |
|
10
|
|
|
const POST_SYNC_FS = 'velikonja_labby.post_sync.fs'; |
|
11
|
|
|
const PRE_SYNC_DB = 'velikonja_labby.pre_sync.db'; |
|
12
|
|
|
const POST_SYNC_DB = 'velikonja_labby.post_sync.db'; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* Private constructor. This class cannot be instantiated. |
|
16
|
|
|
*/ |
|
17
|
|
|
private function __construct() |
|
18
|
|
|
{ |
|
19
|
|
|
} |
|
20
|
|
|
|
|
21
|
15 |
|
public static function all() |
|
22
|
|
|
{ |
|
23
|
15 |
|
$reflection = new \ReflectionClass(get_class()); |
|
24
|
15 |
|
$constants = array(); |
|
25
|
|
|
|
|
26
|
|
|
//search for all constants in this class that start with $prefix |
|
27
|
15 |
|
foreach ($reflection->getConstants() as $constName => $constValue) { |
|
28
|
15 |
|
$constants[$constName] = $constValue; |
|
29
|
|
|
} |
|
30
|
|
|
|
|
31
|
15 |
|
return $constants; |
|
32
|
|
|
} |
|
33
|
|
|
} |
|
34
|
|
|
|