Home > Backend Development > PHP Tutorial > 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 (what to do zgbn)

WBOY
Release: 2016-07-29 09:04:14
Original
1182 people have browsed it

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.


').addClass('pre- numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i
. .
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.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template