summaryrefslogtreecommitdiffstats
path: root/vendor/riimu/kit-pathjoin/src/autoload.php
blob: bc8572d6df1a93291cadab2f328edca4118122dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<?php

// Autoloader for loading the library when composer is not available
spl_autoload_register(function ($class) {
    if (strncmp($class, $ns = 'Riimu\\Kit\\PathJoin\\', strlen($ns)) === 0) {
        $file = substr_replace($class, '\\', 0, strlen($ns)) . '.php';
        $path = __DIR__ . str_replace('\\', DIRECTORY_SEPARATOR, $file);
        if (file_exists($path)) {
            require $path;
        }
    }
});