PluginProbe
Packeta / 1.6.2
Packeta v1.6.2
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 1.6.2, at src/Packetery/Core/Log/ILogger.php

54 lines 938 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
11 namespace Packetery\Core\Log;
12
13 /**
14 * Interface ILogger
15 *
16 * @package Packetery\Log
17 */
18 interface ILogger {
19
20 /**
21 * Registers log driver.
22 */
23 public function register(): void;
24
25 /**
26 * Adds log record.
27 *
28 * @param Record $record Record.
29 */
30 public function add( Record $record ): void;
31
32 /**
33 * Get logs.
34 *
35 * @param mixed $orderId Order ID.
36 * @param string|null $action Action.
37 * @param array $sorting Sorting config.
38 * @param int $limit Limit.
39 *
40 * @return iterable
41 */
42 public function getRecords( $orderId, ?string $action, array $sorting = [], int $limit = 100 ): iterable;
43
44 /**
45 * Counts records.
46 *
47 * @param mixed $orderId Order ID.
48 * @param string|null $action Action.
49 *
50 * @return int
51 */
52 public function countRecords( $orderId = null, ?string $action = null): int;
53 }
54