haxorqt
Home
Console
Upload
information
Create File
Create Folder
About
:
/
home
/
sc1jaqa5103
/
dev.puv-editions.fr
/
wp-content
/
plugins
/
import-onix
/
includes
/
Filename :
Init.php
back
Copy
<?php namespace Firstinfo\Import; use Firstinfo\Import\Controller\Back\SettingController; final class Init { /** * Store all the classes inside an array * @return array Full list of classes */ public static function getServices() { return [ DatabaseManager::class, SettingController::class, ]; } /** * Loop through the classes, initialize them, * and call the register() method if it exists */ public static function registerServices() { if (defined('WP_CLI') && WP_CLI) { include_once __DIR__ . '/Command/SyncToOnix.php'; } foreach (self::getServices() as $class) { $service = new $class; if (method_exists($service, 'register')) { $service->register(); } } } }