autoload.php 610 B

1234567891011121314151617181920
  1. <?php
  2. /**
  3. * This file is part of FPDI
  4. *
  5. * @package 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. spl_autoload_register(static function ($class) {
  10. if (strpos($class, 'Fpdi\\') === 0) {
  11. $filename = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 14)) . '.php';
  12. $fullpath = __DIR__ . DIRECTORY_SEPARATOR . $filename;
  13. if (is_file($fullpath)) {
  14. /** @noinspection PhpIncludeInspection */
  15. require_once $fullpath;
  16. }
  17. }
  18. });