PluginProbe
Auto Alt Text / trunk
Auto Alt Text vtrunk
3.0.3 2.8.2 1.3.1 1.3.2 2.0.0 2.1.0 2.1.1 2.2.0 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.5.0 2.5.1 2.5.2 2.5.3 2.6.0 2.6.1 2.7.0 2.8.0 2.8.1 All 28 releases
auto-alt-text / src / App / Infrastructure / Repositories / ConfigRepositoryInterface.php

ConfigRepositoryInterface.php in Auto Alt Text trunk, at src/App/Infrastructure/Repositories/ConfigRepositoryInterface.php

48 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace AATXT\App\Infrastructure\Repositories;
4
5 /**
6 * Config Repository Interface
7 *
8 * Defines the contract for configuration storage and retrieval.
9 * This interface abstracts WordPress options API for better testability
10 * and adherence to Dependency Inversion Principle.
11 */
12 interface ConfigRepositoryInterface
13 {
14 /**
15 * Get a configuration value
16 *
17 * @param string $key The configuration key
18 * @param mixed $default Default value if key doesn't exist
19 * @return mixed The configuration value or default
20 */
21 public function get(string $key, $default = null);
22
23 /**
24 * Set a configuration value
25 *
26 * @param string $key The configuration key
27 * @param mixed $value The value to store
28 * @return bool True on success, false on failure
29 */
30 public function set(string $key, $value): bool;
31
32 /**
33 * Delete a configuration value
34 *
35 * @param string $key The configuration key to delete
36 * @return bool True on success, false on failure
37 */
38 public function delete(string $key): bool;
39
40 /**
41 * Check if a configuration key exists
42 *
43 * @param string $key The configuration key to check
44 * @return bool True if key exists, false otherwise
45 */
46 public function has(string $key): bool;
47 }
48