August 2016
Intermediate to advanced
286 pages
5h 31m
English
If we placed our autoloader code in a class as a static or instance method, our search for include calls will reveal the inclusion of that class file. If you remove that include call, autoloading will fail, because the class file will not have been loaded. This is a chicken-and-egg problem. The solution is to leave the autoloader include in place as part of our bootstrapping or setup code. If we are fully diligent about removing include calls, that is likely to be the only include remaining in the codebase.
There are several ways to go about this. We could do the following:
Read now
Unlock full access