1<?php
2/**
3 * This file is part of FPDI
4 *
5 * @package   setasign\Fpdi
6 * @copyright Copyright (c) 2020 Setasign GmbH & Co. KG (https://www.setasign.com)
7 * @license   http://opensource.org/licenses/mit-license The MIT License
8 */
9
10spl_autoload_register(function ($class) {
11    if (strpos($class, 'setasign\Fpdi\\') === 0) {
12        $filename = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 14)) . '.php';
13        $fullpath = __DIR__ . DIRECTORY_SEPARATOR . $filename;
14
15        if (file_exists($fullpath)) {
16            /** @noinspection PhpIncludeInspection */
17            require_once $fullpath;
18        }
19    }
20});
21