Recommend this page to a friend! |
Classes of Chun-Sheng, Li | PHP Simple Container Class | README.md | Download |
|
Downloadsimple-containerIntroductionThis is about the simple container to help developers to understand how the Reflection works. UsageFirstly, you have to specify a class that you want to inject. For example, we assume that you want to inject following
Then we use the
If you want to inject class that its constructor arguments is without the default value, we should specify them by ourselves. The sample codes are as follows:
Then we use
ReferencesThis simple-container is about implementing this post. However, this post we refer is incorrect on some approaches. We decide to implement this PHP package to complete the correct container example. |