PluginProbe
Packeta / 2.1
Packeta v2.1
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
packeta / src / Packetery / Core / Log / ILogger.php

ILogger.php in Packeta 2.1, at src/Packetery/Core/Log/ILogger.php

47 lines 923 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Interface ILogger
4 *
5 * @package Packetery\Log
6 */
7
8 declare( strict_types=1 );
9
10 namespace Packetery\Core\Log;
11
12 /**
13 * Interface ILogger
14 *
15 * @package Packetery\Log
16 */
17 interface ILogger {
18 /**
19 * Adds log record.
20 *
21 * @param Record $record Record.
22 */
23 public function add( Record $record ): void;
24
25 /**
26 * Get logs.
27 *
28 * @param int|null $orderId Order ID.
29 * @param string|null $action Action.
30 * @param array<string, string> $sorting Sorting config.
31 * @param int $limit Limit.
32 *
33 * @return iterable<Record>
34 */
35 public function getRecords( ?int $orderId, ?string $action, array $sorting = [], int $limit = 100 ): iterable;
36
37 /**
38 * Counts records.
39 *
40 * @param int|null $orderId Order ID.
41 * @param string|null $action Action.
42 *
43 * @return int
44 */
45 public function countRecords( ?int $orderId = null, ?string $action = null ): int;
46 }
47