Home > Article > Backend Development > PHP implements dependency injection - using reflection mechanism and dynamic proxy technology - simple idea (what to do zgbn)
PHP implements dependency injection - using reflection mechanism and dynamic proxy technology - simple idea
Attachment CSDN download address: PHP implements dependency injection - using reflection mechanism and dynamic proxy technology
Now I don’t know how to use the namespace definition of the XML file, so for the time being I will use the spring configuration file in java. Please understand.
I am also a beginner in php now.
Since I have to import other php files every time I write a php program, this gives me a headache,
So I imitated the dynamic injection function of spring in java,
I wrote this piece of code. I have tested this code and it seems to work relatively well.
However, I think there are still many unreasonable uses and some bugs.
I will slowly modify this in the future. Please also give me some advice.
. | . |
---|---|
Author: | What can I do? |
').text(i)); }; $numbering.fadeIn(1700); }); }); | The above introduces the implementation of dependency injection in PHP - using reflection mechanism and dynamic proxy technology - a simple idea (how to do it zgbn), including aspects of the content, I hope it will be helpful to friends who are interested in PHP tutorials. |