@ -27,15 +27,20 @@ require_once __DIR__ . '/../vendor/autoload.php';
|
||||
*/
|
||||
function mdCsvxmlAutoloader(string $className):void {
|
||||
|
||||
$classDirs = AUTOLOAD_DIRS;
|
||||
// Try using class map as defined through /scripts/buildClassMap.php
|
||||
|
||||
foreach ($classDirs as $classDir) {
|
||||
if (isset(AUTOLOAD_CLASS_MAP[$className])) {
|
||||
include AUTOLOAD_CLASS_MAP[$className];
|
||||
return;
|
||||
}
|
||||
|
||||
// Fallback: Load classes by autoload directories
|
||||
|
||||
foreach (AUTOLOAD_DIRS as $classDir) {
|
||||
if (\file_exists("$classDir/$className.php")) {
|
||||
include "$classDir/$className.php";
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -309,7 +314,8 @@ function rrmdir(string $dir):void {
|
||||
$objects = scandir($dir);
|
||||
foreach ($objects as $object) {
|
||||
if ($object != "." && $object != "..") {
|
||||
if (filetype($dir . "/" . $object) == "dir") rrmdir($dir . "/" . $object); else unlink($dir . "/" . $object);
|
||||
if (filetype($dir . "/" . $object) == "dir") rrmdir($dir . "/" . $object);
|
||||
else unlink($dir . "/" . $object);
|
||||
}
|
||||
}
|
||||
reset($objects);
|
||||
|
Reference in New Issue
Block a user