| 1 |
<?php |
| 2 |
/** |
| 3 |
* Settings interface |
| 4 |
* |
| 5 |
* @package SeQura/WC |
| 6 |
* @subpackage SeQura/WC/Services |
| 7 |
*/ |
| 8 |
|
| 9 |
namespace SeQura\WC\Services; |
| 10 |
|
| 11 |
/** |
| 12 |
* Settings interface |
| 13 |
*/ |
| 14 |
interface Interface_Settings { |
| 15 |
|
| 16 |
/** |
| 17 |
* Get preferences. Also sets defaults if not set. |
| 18 |
* |
| 19 |
* @return mixed[] Array of preferences. |
| 20 |
*/ |
| 21 |
public function all(); |
| 22 |
|
| 23 |
/** |
| 24 |
* Get preference by key |
| 25 |
* |
| 26 |
* @param string $key Preference key. |
| 27 |
* |
| 28 |
* @return mixed|null Preference value. Null if not found. |
| 29 |
*/ |
| 30 |
public function get( $key ); |
| 31 |
|
| 32 |
/** |
| 33 |
* Get default preferences |
| 34 |
* |
| 35 |
* @return mixed[] Array of default preferences. |
| 36 |
*/ |
| 37 |
public function defaults(); |
| 38 |
|
| 39 |
/** |
| 40 |
* Check if debug mode is enabled. |
| 41 |
* |
| 42 |
* @return bool |
| 43 |
*/ |
| 44 |
public function is_debug_enabled(); |
| 45 |
|
| 46 |
/** |
| 47 |
* Get general settings. |
| 48 |
* |
| 49 |
* @param int|null $blog_id The blog ID. |
| 50 |
* |
| 51 |
* @return mixed |
| 52 |
*/ |
| 53 |
public function get_general_settings( $blog_id = null ); |
| 54 |
|
| 55 |
/** |
| 56 |
* Check if the current page is the settings page. |
| 57 |
*/ |
| 58 |
public function is_settings_page(): bool; |
| 59 |
} |
| 60 |
|