2024-02-26 14:47:51 +01:00
|
|
|
<?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;
|
|
|
|
});
|
|
|
|
|
2024-03-16 14:21:57 +01:00
|
|
|
|
|
|
|
$directoryPath = BDP_LV_PLUGIN_DIR . 'components/partials/';
|
|
|
|
foreach (glob($directoryPath . '*.php') as $file) {
|
|
|
|
require_once $file;
|
|
|
|
}
|
|
|
|
|
2024-03-23 20:46:44 +01:00
|
|
|
$subdirs = ['includes', 'Controllers', 'Views', 'Requests', 'Actions'];
|
2024-02-26 14:47:51 +01:00
|
|
|
|
2024-03-24 19:52:32 +01:00
|
|
|
foreach (scandir(BDP_LV_PLUGIN_DIR . 'modules/') as $curModule) {
|
|
|
|
if ($curModule != '.' && $curModule != '..' && is_dir(BDP_LV_PLUGIN_DIR . 'modules/' . $curModule))
|
|
|
|
{
|
|
|
|
if ($curModule == 'calendar') {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($subdirs as $dir) {
|
|
|
|
$directoryPath = BDP_LV_PLUGIN_DIR . 'modules/' . $curModule . '/' . $dir . '/';
|
|
|
|
foreach (glob($directoryPath . '*.php') as $file) {
|
|
|
|
require_once $file;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-02-26 14:47:51 +01:00
|
|
|
}
|