-
Notifications
You must be signed in to change notification settings - Fork 5
/
Resources.php
55 lines (43 loc) · 1.18 KB
/
Resources.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
namespace Enqueue\Monitoring;
final class Resources
{
/**
* @var array
*/
private static $knownStorages = null;
private function __construct()
{
}
public static function getKnownSchemes(): array
{
$map = self::getKnownStorages();
$schemes = [];
foreach ($map as $storageClass => $item) {
foreach ($item['schemes'] as $scheme) {
$schemes[$scheme] = $storageClass;
}
}
return $schemes;
}
public static function getKnownStorages(): array
{
if (null === self::$knownStorages) {
$map = [];
$map[WampStorage::class] = [
'schemes' => ['wamp', 'ws'],
'supportedSchemeExtensions' => [],
];
$map[InfluxDbStorage::class] = [
'schemes' => ['influxdb'],
'supportedSchemeExtensions' => [],
];
$map[DatadogStorage::class] = [
'schemes' => ['datadog'],
'supportedSchemeExtensions' => [],
];
self::$knownStorages = $map;
}
return self::$knownStorages;
}
}