Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** @license For full copyright and license information, please see the LICENSE.md file. */ |
| 6 | |
| 7 | namespace App\Core\Settings; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | /** |
| 12 | * System Settings Repository Contract. |
| 13 | * |
| 14 | * Defines methods for accessing configuration settings. |
| 15 | * |
| 16 | * @package App\Core\Settings |
| 17 | */ |
| 18 | interface SettingsRepositoryInterface |
| 19 | { |
| 20 | /** |
| 21 | * Retrieves setting string value by key name. |
| 22 | * |
| 23 | * @param string $key Setting unique key name. |
| 24 | * @param string $default Default fallback string value. |
| 25 | * @return string Setting value. |
| 26 | */ |
| 27 | public function get(string $key, string $default = ''): string; |
| 28 | |
| 29 | /** |
| 30 | * Retrieves integer setting value. |
| 31 | * |
| 32 | * @param string $key Setting key name. |
| 33 | * @param int $default Default integer fallback. |
| 34 | * @return int Parsed integer value. |
| 35 | */ |
| 36 | public function getInt(string $key, int $default = 0): int; |
| 37 | } |