40 lines
1.0 KiB
PHP
40 lines
1.0 KiB
PHP
<?php
|
|
spl_autoload_register(function ($className) {
|
|
|
|
if (!str_starts_with($className, 'ProtectLogin\\')) {
|
|
return;
|
|
}
|
|
|
|
$fileName = str_replace('\\','/', $className);
|
|
$fileName = str_replace('ProtectLogin/Modules/', 'ProtectLogin/modules/', $fileName);
|
|
$fileName = str_replace('ProtectLogin/', '', $fileName);
|
|
|
|
|
|
|
|
$fileName = BDP_LV_PLUGIN_DIR . $fileName . '.php';
|
|
if (!file_exists($fileName)) {
|
|
return;
|
|
}
|
|
|
|
require_once $fileName;
|
|
});
|
|
|
|
|
|
$directoryPath = BDP_LV_PLUGIN_DIR . 'components/partials/';
|
|
foreach (glob($directoryPath . '*.php') as $file) {
|
|
require_once $file;
|
|
}
|
|
|
|
|
|
|
|
$modules = ['KompassSettings', 'LimitLoginAttempts', 'PasswordStrength', 'seo', 'Gruppen'];
|
|
$subdirs = ['includes', 'Controllers', 'Views'];
|
|
|
|
foreach ($modules as $curModule) {
|
|
foreach ($subdirs as $dir) {
|
|
$directoryPath = BDP_LV_PLUGIN_DIR . 'modules/' . $curModule . '/' . $dir . '/';
|
|
foreach (glob($directoryPath . '*.php') as $file) {
|
|
require_once $file;
|
|
}
|
|
}
|
|
} |