Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace Drupal\visitors; |
4 | |
5 | /** |
6 | * Interface for tracker visitors. |
7 | */ |
8 | interface VisitorsTrackerInterface { |
9 | |
10 | const SESSION_TIMEOUT = 1800; |
11 | |
12 | /** |
13 | * Writes the log. |
14 | * |
15 | * @param string[] $fields |
16 | * The fields array. |
17 | * |
18 | * @return int |
19 | * The id of row created. |
20 | */ |
21 | public function writeLog(array $fields): int; |
22 | |
23 | /** |
24 | * Gets the visit id. |
25 | * |
26 | * @param string[] $fields |
27 | * The fields array. |
28 | * @param int $request_time |
29 | * The request time. |
30 | * |
31 | * @return int |
32 | * The visit id. |
33 | */ |
34 | public function getVisitId(array $fields, int $request_time): int; |
35 | |
36 | /** |
37 | * Updates the visit. |
38 | * |
39 | * @param int $visit_id |
40 | * The visit id. |
41 | * @param int $log_id |
42 | * The log id. |
43 | * @param int $exit_time |
44 | * The exit time. |
45 | * @param int|null $uid |
46 | * The user id. |
47 | */ |
48 | public function updateVisit(int $visit_id, int $log_id, int $exit_time, ?int $uid); |
49 | |
50 | } |