1 | <?php |
||
30 | class Tick extends Event implements TickInterface |
||
31 | { |
||
32 | const SUCCESS = 1; |
||
33 | const FAIL = 0; |
||
34 | const SKIP = -1; |
||
35 | |||
36 | /** |
||
37 | * @var string Custom Message |
||
38 | */ |
||
39 | private $message; |
||
40 | |||
41 | /** |
||
42 | * @var float Timestamp (microtime float) |
||
43 | */ |
||
44 | private $timestamp; |
||
45 | |||
46 | /** |
||
47 | * @var int The status of tick (success, fail, or skip) |
||
48 | */ |
||
49 | private $status; |
||
50 | |||
51 | /** |
||
52 | * @var int |
||
53 | */ |
||
54 | private $incrementBy; |
||
55 | |||
56 | /** |
||
57 | * @var Report |
||
58 | */ |
||
59 | private $report; |
||
60 | |||
61 | /** |
||
62 | * @var array |
||
63 | */ |
||
64 | private $extraInfo; |
||
65 | |||
66 | /** |
||
67 | * Constructor |
||
68 | * |
||
69 | * @param Tracker $tracker |
||
70 | * @param int $status |
||
71 | * @param string $message |
||
72 | * @param array $extraInfo |
||
73 | * @param int $incrementBy |
||
74 | */ |
||
75 | public function __construct(Tracker $tracker, $status = self::SUCCESS, $message = '', array $extraInfo = [], $incrementBy = 1) |
||
89 | |||
90 | /** |
||
91 | * Returns the message associated with the Tick event |
||
92 | * |
||
93 | * @return string |
||
94 | */ |
||
95 | public function getMessage() |
||
99 | |||
100 | /** |
||
101 | * Returns the timestamp (microtime float) of the Tick event |
||
102 | * |
||
103 | * @return float |
||
104 | */ |
||
105 | public function getTimestamp() |
||
109 | |||
110 | /** |
||
111 | * Returns the status (Tick::SUCCESS, Tick::FAIL, TICK::SKIP) of the Tick event |
||
112 | * |
||
113 | * @return int |
||
114 | */ |
||
115 | public function getStatus() |
||
119 | |||
120 | /** |
||
121 | * Returns the number of increments associated with with the Tick event |
||
122 | * |
||
123 | * @return int |
||
124 | */ |
||
125 | public function getIncrementBy() |
||
129 | |||
130 | /** |
||
131 | * Returns the report associated with the Tick event |
||
132 | * |
||
133 | * @return Report |
||
134 | */ |
||
135 | public function getReport() |
||
139 | |||
140 | /** |
||
141 | * Returns any extra information associated with the Tick event |
||
142 | * |
||
143 | * @return array |
||
144 | */ |
||
145 | public function getExtraInfo() |
||
149 | } |
||
150 |