| 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 array $sorting Sorting. |
| 37 |
* @param int $limit Sorting. |
| 38 |
* |
| 39 |
* @return iterable |
| 40 |
*/ |
| 41 |
public function getRecords( $orderId, array $sorting = [], int $limit = 100 ): iterable; |
| 42 |
|
| 43 |
/** |
| 44 |
* Counts records. |
| 45 |
* |
| 46 |
* @param mixed $orderId Order ID. |
| 47 |
* |
| 48 |
* @return int |
| 49 |
*/ |
| 50 |
public function countRecords( $orderId ): int; |
| 51 |
} |
| 52 |
|