Loader module for parsing zendframework
What is automatic loading?Autoloading is a mechanism that replaces the code files or classes that are manually introduced (require or include) with Program Hosting during the encoding process. According to the instructions in the PHP manual, once autoloader is defined, it will be automatically called when classes or interfaces that have not been defined (or not introduced) are used. You do not need to worry about the specific position of the class in the project when using the automatic loading mechanism. The well-designed Autoloaders can be used directly without concern about the location of the target class associated with the current class. The automatic loader will automatically find and load the class file. In addition, because the automatic loading mechanism delays loading and ensures that only one matching is performed, removing redundant require_once () calls especially before the formal deployment will greatly improve the performance. ZF encourages the use of the automatic loading mechanism and provides some tools so that the core library code of ZF can be automatically loaded and the application code can be automatically loaded. These tools and how to use them effectively will be introduced later.
Descriptions of the loader module:
Core loader class: Zend/loader. php
The Extension function file of the loader module is located in the Zend/loader/directory. The directory structure is shown as follows:
It includes the automatic loader, plug-in loader, and their subdirectories with the same name, these subdirectories are mainly used to store interfaces, exceptions, and definitions of corresponding sub-modules or functions.
The specific parsing content is as follows:
1. Description of the zendframework automatic loading mechanism.
2. zend_loader Class Structure and Function Analysis (Zend/loader. php ).
3. zend_loader_autoloader Class Structure and Function Analysis.
4. zend_loader_autoloader_interface Class Structure and Function Analysis.
5. zend_autoloader_resource Class Structure and Function Analysis.
6. Structure and Function Analysis of the zend_loader_pluginloader_interface class.
7. zend_loader_pluginloader Class Structure and Function Analysis.