1. if you want to implement the plug-in mechanism in your own blog, the problem is to add hooks on many nodes of the program and then execute the call on the hook. 2. but I have a question: how can I pass the data to the call on the hook? Directly using parameters? I think this is too rigid ,... 1. if you want to implement the plug-in mechanism in your own blog, the problem is to add hooks on many nodes of the program and then execute the call on the hook.
2. but I have a question: how can I pass the data to the call on the hook? Directly using parameters? I think this is too rigid. Is there a flexible way? Or use global?
3. I have been entangled in this question for a long time. please answer the question ^-^
Reply content:
1. if you want to implement the plug-in mechanism in your own blog, the problem is to add hooks on many nodes of the program and then execute the call on the hook.
2. but I have a question: how can I pass the data to the call on the hook? Directly using parameters? I think this is too rigid. Is there a flexible way? Or use global?
3. I have been entangled in this question for a long time. please answer the question ^-^
It is rigid and standard, and a hook has clear parameters, which is good for maintainability and scalability of the program. furthermore, your input parameters are variable. you can use an array encapsulation to implement any desired parameter format.