Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
Events | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
get_valid_actions | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
get_category | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | namespace NewfoldLabs\WP\Module\Performance\Data; |
3 | |
4 | /** |
5 | * Contains data related to performance Hiive events. |
6 | */ |
7 | final class Events { |
8 | /** |
9 | * The Array of categories in an event. |
10 | * |
11 | * @var array |
12 | */ |
13 | protected static $category = array( 'nfd_performance' ); |
14 | |
15 | /** |
16 | * List of valid actions that an event can perform. |
17 | * |
18 | * A value of true indicates that the action is valid, set it to null if you want to invalidate an action. |
19 | * |
20 | * @var array |
21 | */ |
22 | protected static $valid_actions = array( |
23 | 'image_transformation_requested' => true, |
24 | 'image_transformation_completed' => true, |
25 | 'image_transformation_failed' => true, |
26 | 'image_resized' => true, |
27 | ); |
28 | |
29 | /** |
30 | * Returns the list of valid actions that an event can perform |
31 | * |
32 | * @return array |
33 | */ |
34 | public static function get_valid_actions() { |
35 | return self::$valid_actions; |
36 | } |
37 | |
38 | /** |
39 | * Valid categories of on event. |
40 | * |
41 | * @return array |
42 | */ |
43 | public static function get_category() { |
44 | return self::$category; |
45 | } |
46 | } |