-
Notifications
You must be signed in to change notification settings - Fork 517
/
Copy pathenum.php
66 lines (62 loc) · 1.67 KB
/
enum.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
56
57
58
59
60
61
62
63
64
65
66
<?php
class ProcessArg
{
const VALUE = 0;
const INPUTID = 1;
const FEEDID = 2;
const NONE = 3;
const TEXT = 4;
const SCHEDULEID = 5;
}
class DataType
{
const UNDEFINED = 0;
const REALTIME = 1;
const DAILY = 2;
const HISTOGRAM = 3;
}
class Engine
{
const MYSQL = 0;
const TIMESTORE = 1; // Depreciated
const PHPTIMESERIES = 2;
const GRAPHITE = 3; // Not included in core
const PHPTIMESTORE = 4; // Depreciated
const PHPFINA = 5;
const PHPFIWA = 6;
const VIRTUALFEED = 7; // Virtual feed, on demand post processing
const MYSQLMEMORY = 8; // Mysql with MEMORY tables on RAM. All data is lost on shutdown
const REDISBUFFER = 9; // (internal use only) Redis Read/Write buffer, for low write mode
const CASSANDRA = 10; // Cassandra
/**
* returns array of all known engines
*
* @return array
*/
public static function get_all()
{
return array(
'MYSQL' => Engine::MYSQL,
'TIMESTORE' => Engine::TIMESTORE,
'PHPTIMESERIES' => Engine::PHPTIMESERIES,
'GRAPHITE' => Engine::GRAPHITE,
'PHPTIMESTORE' => Engine::PHPTIMESTORE,
'PHPFINA' => Engine::PHPFINA,
'PHPFIWA' => Engine::PHPFIWA,
'VIRTUALFEED' => Engine::VIRTUALFEED,
'MYSQLMEMORY' => Engine::MYSQLMEMORY,
'REDISBUFFER' => Engine::REDISBUFFER,
'CASSANDRA' => Engine::CASSANDRA
);
}
/**
* return true if given $engineid is a known
*
* @param [int] $engineid
* @return boolean
*/
public static function is_valid($engineid)
{
return in_array($engineid, Engine::get_all());
}
}