Steve White ae9ece5266 *** Initial Commit of Files for APRS.TO Backend Administration Panel ***
This code is non-functional at this point.
2025-02-02 15:53:34 -05:00

26 lines
818 B
PHP

<?php
/**
* Autoload classes when needed
*
* @param string $className
* @return null
*/
function php8__autoload($className)
{
if (file_exists(ROOT . '/includes/' . strtolower($className) . '.class.php')) {
include_once ROOT . '/includes/' . strtolower($className) . '.class.php';
} else if (file_exists(ROOT . '/includes/models/' . strtolower($className) . '.class.php')) {
include_once ROOT . '/includes/models/' . strtolower($className) . '.class.php';
} else if (file_exists(ROOT . '/includes/repositories/' . strtolower($className) . '.class.php')) {
include_once ROOT . '/includes/repositories/' . strtolower($className) . '.class.php';
} else {
error_log(sprintf('Could not find class %s', $className));
}
}
spl_autoload_register('php8__autoload');