php-whois/autoload.php
2026-11-28 15:28:08 +02:00

12 lines
419 B
PHP

<?php
// Without Composer: require this file. With Composer, use vendor/autoload.php.
spl_autoload_register(static function (string $class): void {
$prefix = 'MozOut\\Whois\\';
if (strncmp($class, $prefix, strlen($prefix)) !== 0) {
return;
}
$file = __DIR__ . '/src/' . str_replace('\\', '/', substr($class, strlen($prefix))) . '.php';
if (is_file($file)) {
require $file;
}
});