thinkphp How to extend the core class? For example, I want to extend the routing class, inherit thinkphp's core routing class first, and then let thinkphp run my extended routing class instead of the original core routing class?
25 points left, help ah ~ ~
Reply to discussion (solution)
Extending the core class that means you need to refer to the part of your own to call your own. Remove the default for the frame, as far as the extended file is going to look at yourself, the point is that you need to find out where his routing control was introduced.
Extending the core class that means you need to refer to the part of your own to call your own. Remove the default for the frame, as far as the extended file is going to look at yourself, the point is that you need to find out where his routing control was introduced.
The introduction of the place is also the core class, if the direct replacement, it moved the core of TP class, is not want to move TP core class, just want to expand, or directly to the TP routing class
Extending the core class that means you need to refer to the part of your own to call your own. Remove the default for the frame, as far as the extended file is going to look at yourself, the point is that you need to find out where his routing control was introduced.
The introduction of the place is also the core class, if the direct replacement, it moved the core of TP class, is not want to move TP core class, just want to expand, or directly to the TP routing class
Then you can add a configuration and then in the core class to add a judgment, if the configuration using TP from the original call TP, otherwise call yourself custom not good.
Please read carefully the chapter on "Behavior extension" in the manual.