August 2016
Intermediate to advanced
286 pages
5h 31m
English
Not all legacy applications use a large set of classes. Often, instead of classes, there is a significant number of user-defined functions for core logic.
Using functions is not a problem in itself, but it does mean that we need to include the files where the functions are defined. But autoloading only works for classes. It would be good to find a way to automatically load the function files as well as the class files. That would help us remove even more include calls.
The solution here is to move the functions into class files, and call the functions as static methods on those classes. That way, the autoloader can load up the class file for us, and then we can call the methods in that class.
This procedure ...
Read now
Unlock full access