1 | <?php |
||
11 | class CacheLogEnum { |
||
12 | const ACCESSED = 'accessed'; |
||
13 | const MISSED = 'missed'; |
||
14 | const DELETED = 'deleted'; |
||
15 | const CLEANED = 'cleaned'; |
||
16 | const SAVED = 'saved'; |
||
17 | const PREFETCHED = 'prefetched'; |
||
18 | |||
19 | public static function getNames() { |
||
20 | return array( |
||
21 | self::ACCESSED => '<span class="cache-success">Accessed</span>', |
||
22 | self::MISSED => '<span class="cache-miss">Missed</span>', |
||
23 | self::DELETED => '<span class="cache-deleted">Deleted</span>', |
||
24 | self::CLEANED => '<span class="cache-cleaned">Cleaned</span>', |
||
25 | self::SAVED => '<span class="cache-save">Saved</span>', |
||
26 | self::PREFETCHED => '<span class="cache-prefetched">Prefetched</span>' |
||
27 | ); |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Returns an array with all enum values. |
||
32 | * @return array |
||
33 | * @codeCoverageIgnore |
||
34 | */ |
||
35 | static public function getAll() { |
||
38 | |||
39 | /** |
||
40 | * Checks if a value is a valid grant |
||
41 | * |
||
42 | * @param string $value |
||
43 | * @return boolean true if valid |
||
44 | * @codeCoverageIgnore |
||
45 | */ |
||
46 | static public function valid($value) { |
||
49 | |||
50 | /** |
||
51 | * Given a name, returns its value or a string saying it is invalid. |
||
52 | * |
||
53 | * @param string $value |
||
54 | * @return string |
||
55 | * @codeCoverageIgnore |
||
56 | */ |
||
57 | static public function getName($value) { |
||
64 | } |
||
65 |