PluginProbe
seQura / trunk
seQura vtrunk
4.3.4 4.3.3 4.3.2 4.3.1 trunk 2.0.0 2.0.10 2.0.11 2.0.12 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 3.0.0 3.0.2 3.0.5 3.0.6 3.0.7 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 4.0.0 All 30 releases
sequra / src / Services / Log / interface-log-file.php

interface-log-file.php in seQura trunk, at src/Services/Log/interface-log-file.php

47 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Log File Interface
4 *
5 * @package SeQura/WC
6 * @subpackage SeQura/WC/Services
7 */
8
9 namespace SeQura\WC\Services\Log;
10
11 /**
12 * Provides methods to perform read and write operations on a log file.
13 */
14 interface Interface_Log_File {
15
16 /**
17 * Append content at the end of the log file.
18 *
19 * @param string $content The content to append.
20 * @throws \Exception If something goes wrong. The exception message will contain the error message.
21 */
22 public function append_content( $content ): void;
23
24 /**
25 * Get the content of the log file.
26 *
27 * @param string $store_id The store ID.
28 * @throws \Exception If something goes wrong. The exception message will contain the error message.
29 *
30 * @return string[] Each element is a line of the log file.
31 */
32 public function get_content( $store_id ): array;
33
34 /**
35 * Clear the log file.
36 *
37 * @param string $store_id The store ID.
38 * @throws \Exception If something goes wrong. The exception message will contain the error message.
39 */
40 public function clear( $store_id = null ): void;
41
42 /**
43 * Make sure the log file exists and is writable.
44 */
45 public function setup(): bool;
46 }
47