| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin initialization handling. |
| 4 |
* |
| 5 |
* @package Plugin |
| 6 |
* @author Pierre Lannoy <https://pierre.lannoy.fr/>. |
| 7 |
* @since 1.0.0 |
| 8 |
*/ |
| 9 |
|
| 10 |
namespace PODeviceDetector\Plugin; |
| 11 |
|
| 12 |
/** |
| 13 |
* Fired after 'plugins_loaded' hook. |
| 14 |
* |
| 15 |
* This class defines all code necessary to run during the plugin's initialization. |
| 16 |
* |
| 17 |
* @package Plugin |
| 18 |
* @author Pierre Lannoy <https://pierre.lannoy.fr/>. |
| 19 |
* @since 1.0.0 |
| 20 |
*/ |
| 21 |
class Initializer { |
| 22 |
|
| 23 |
/** |
| 24 |
* Initialize the class and set its properties. |
| 25 |
* |
| 26 |
* @since 1.0.0 |
| 27 |
*/ |
| 28 |
public function __construct() { |
| 29 |
|
| 30 |
} |
| 31 |
|
| 32 |
/** |
| 33 |
* Initialize the plugin. |
| 34 |
* |
| 35 |
* @since 1.0.0 |
| 36 |
*/ |
| 37 |
public function initialize() { |
| 38 |
\PODeviceDetector\System\Sitehealth::init(); |
| 39 |
\PODeviceDetector\Plugin\Feature\Schema::init(); |
| 40 |
\PODeviceDetector\System\APCu::init(); |
| 41 |
} |
| 42 |
|
| 43 |
/** |
| 44 |
* Initialize the plugin. |
| 45 |
* |
| 46 |
* @since 1.0.0 |
| 47 |
*/ |
| 48 |
public function late_initialize() { |
| 49 |
require_once PODD_PLUGIN_DIR . 'perfopsone/init.php'; |
| 50 |
} |
| 51 |
|
| 52 |
} |
| 53 |
|