File: autoload.php

package info (click to toggle)
php-league-csv 9.23.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 39,720 kB
  • sloc: php: 13,345; javascript: 80; makefile: 29; xml: 29
file content (14 lines) | stat: -rw-r--r-- 339 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php

require __DIR__ . '/src/functions_include.php';

spl_autoload_register(static function (string $class): void {
    if (!str_starts_with($class, 'League\Csv\\')) {
        return;
    }

    $file = __DIR__ . '/src/' . str_replace('\\', '/', substr($class, 11)).'.php';
    if (is_readable($file)) {
        require $file;
    }
});