1 | <?php |
||
21 | class ClassLoader |
||
22 | { |
||
23 | /** |
||
24 | * @var \hanneskod\classtools\Iterator\SplFileInfo[] Maps names to SplFileInfo objects |
||
25 | */ |
||
26 | private $classMap = []; |
||
27 | |||
28 | /** |
||
29 | * Load classmap at construct |
||
30 | */ |
||
31 | public function __construct(ClassIterator $classIterator, bool $register = true) |
||
38 | |||
39 | /** |
||
40 | * Register autoloader |
||
41 | */ |
||
42 | public function register(): bool |
||
46 | |||
47 | /** |
||
48 | * Unregister autoloader |
||
49 | */ |
||
50 | public function unregister(): bool |
||
54 | |||
55 | /** |
||
56 | * Attempt to load class definition |
||
57 | */ |
||
58 | public function load(string $classname): void |
||
64 | } |
||
65 |