autoload_function.php 228 B

123456789101112
  1. <?php
  2. return function ($class) {
  3. static $map;
  4. if (!$map) {
  5. $map = include __DIR__ . '/autoload_classmap.php';
  6. }
  7. if (!isset($map[$class])) {
  8. return false;
  9. }
  10. return include $map[$class];
  11. };