Phpcms V9 Loading Sequence
Compared with V8, phpcms V9 has the same overall direction of thinking. The difference is that V9 combines OOP and MVC more perfectly.
Open index. php In the root directory.Code, Which is clearer than V8 index. php,
Base under phpcms. PHP file is a basic class with functions similar to V8 common. inc. the difference between PHP is that it can directly call all common functions of the loading system class, application class, data model, system function, application function, and configuration file through pc_base:
For example, pc_base: load_sys_func ('global ')
Is to load the system function library, include the file libs \ functions \ global. func. PHP, _ load_func uses two parameters. If the second parameter is not empty, the include path is $ path \ global. func. PHP
Pc_base: load_config ('system', 'errorlog ')
Is to load the configuration file, include cache_path/configs/system. php, and then read whether there is a key value named errorlog
Pc_base: load_sys_class ('application ')
Is to load the system class method, include libs/classes/application. class. PHP is instantiated by default. It is instantiated into the classes array. In this method, if you have your own extension class (phpcms \ libs \ Classes \ my_application.class.php ), it is automatically loaded and instantiated.
In the constructor of the application class, include libs/classes/Param. class. PHP, load pc_base: load_config ('route ', 'default'), directly obtain the default MVA, and then execute init, load_controller (load Controller) to load through Param. class. configure the Controller in PHP, and then initialize the init event in the Controller.