| 1 |
<?php |
| 2 |
/** |
| 3 |
* Abstract class for defining security tweaks. |
| 4 |
* |
| 5 |
* @package WP_Defender\Component\Security_Tweaks |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace WP_Defender\Component\Security_Tweaks; |
| 9 |
|
| 10 |
use Calotes\Base\Component; |
| 11 |
|
| 12 |
/** |
| 13 |
* Abstract class for Security Tweaks. |
| 14 |
*/ |
| 15 |
abstract class Abstract_Security_Tweaks extends Component { |
| 16 |
|
| 17 |
/** |
| 18 |
* Unique identifier for the tweak. |
| 19 |
* |
| 20 |
* @var string $slug |
| 21 |
*/ |
| 22 |
public string $slug; |
| 23 |
|
| 24 |
/** |
| 25 |
* Retrieve the tweak's label. |
| 26 |
* |
| 27 |
* @return string |
| 28 |
*/ |
| 29 |
abstract public function get_label(): string; |
| 30 |
|
| 31 |
/** |
| 32 |
* Get the error reason. |
| 33 |
* |
| 34 |
* @return string |
| 35 |
*/ |
| 36 |
abstract public function get_error_reason(): string; |
| 37 |
|
| 38 |
/** |
| 39 |
* Return the tweak's summary data. |
| 40 |
* |
| 41 |
* @return array |
| 42 |
*/ |
| 43 |
abstract public function to_array(): array; |
| 44 |
} |
| 45 |
|