blob: b036eb48d9e34a9a11ef2f1eaf66ba98e3e9355c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
<?php
function pfsense_www_class_autoloader($classname) {
// Convert classname to match filename conventions
$filename = str_replace('_', '/', $classname);
// Build the full path, load it if it exists
$filepath = "classes/$filename.class.php";
if (file_exists($filepath)) {
require_once($filepath);
}
}
spl_autoload_register('pfsense_www_class_autoloader');
|