How does thinkphp extend the core class? How does thinkphp extend the core class? For example, if I want to extend the routing class, first inherit the core routing class of thinkphp, and then let thinkphp run my extended routing class instead of the original core routing class?
We have 25 minutes left. can you help me ~~
Reply to discussion (solution)
Extend the core class, that is, you need to call some more of your own calls to remove the default framework. the loss of the extension file depends on your own wishes, the key point is that you need to step by step find out which route control is introduced.
Extend the core class, that is, you need to call some more of your own calls to remove the default framework. the loss of the extension file depends on your own wishes, the key point is that you need to step by step find out which route control is introduced.
The introduced content is also the core class. if you replace it directly, it will change the core class of tp. you just want to extend it without having to change the core class of tp. Otherwise, you will change the routing class of tp directly.
Extend the core class, that is, you need to call some more of your own calls to remove the default framework. the loss of the extension file depends on your own wishes, the key point is that you need to step by step find out which route control is introduced.
The introduced content is also the core class. if you replace it directly, it will change the core class of tp. you just want to extend it without having to change the core class of tp. Otherwise, you will change the routing class of tp directly.
You can add a configuration and add a judgment to the core class. if the configuration uses the built-in TP, it will call the original TP; otherwise, it will be better to call the custom one.
Read the "behavior extension" section in the manual carefully.