| 1 |
<?php |
| 2 |
/** |
| 3 |
* Responsible for managing server configurations related to security tweaks . |
| 4 |
* |
| 5 |
* @package WP_Defender\Component\Security_Tweaks\Servers |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace WP_Defender\Component\Security_Tweaks\Servers; |
| 9 |
|
| 10 |
/** |
| 11 |
* Class for case when we need to "compile PHP to WebAssembly". |
| 12 |
* |
| 13 |
* @since 4.5.1 |
| 14 |
*/ |
| 15 |
class PHP_Wasm { |
| 16 |
|
| 17 |
/** |
| 18 |
* Service type. |
| 19 |
* |
| 20 |
* @var string |
| 21 |
*/ |
| 22 |
private $type = null; |
| 23 |
|
| 24 |
/** |
| 25 |
* Constructor for class. |
| 26 |
* |
| 27 |
* @param string $type The type of the security tweak. |
| 28 |
*/ |
| 29 |
public function __construct( $type ) { |
| 30 |
$this->type = $type; |
| 31 |
} |
| 32 |
|
| 33 |
/** |
| 34 |
* Check whether the issue has been resolved or not. |
| 35 |
* |
| 36 |
* @return bool |
| 37 |
*/ |
| 38 |
public function check() { |
| 39 |
// Todo:add logic using $this->type for 'prevent-php-executed' & 'protect-information'. |
| 40 |
return false; |
| 41 |
} |
| 42 |
|
| 43 |
/** |
| 44 |
* Process the rule. |
| 45 |
* |
| 46 |
* @return bool |
| 47 |
*/ |
| 48 |
public function process() { |
| 49 |
return true; |
| 50 |
} |
| 51 |
|
| 52 |
/** |
| 53 |
* Revert the rule. |
| 54 |
* |
| 55 |
* @return bool |
| 56 |
*/ |
| 57 |
public function revert() { |
| 58 |
return true; |
| 59 |
} |
| 60 |
} |
| 61 |
|