Initial commit

This commit is contained in:
isUnknown 2024-07-10 16:10:33 +02:00
commit 08a8a71c55
631 changed files with 139902 additions and 0 deletions

View file

@ -0,0 +1,21 @@
<?php
namespace Kirby\Kql;
use Kirby\Toolkit\Str;
function autoload(string $namespace, string $dir)
{
spl_autoload_register(function ($class) use ($namespace, $dir) {
if (str_contains($class, '.') === true || str_starts_with($class, $namespace) === false) {
return;
}
$path = Str::after($class, $namespace);
$path = $dir . '/' . str_replace('\\', '/', $path) . '.php';
if (is_file($path) === true) {
include $path;
}
});
}