39

symfony源码分析之容器的生成与使用-风之韵

 5 years ago
source link: http://blog.51cto.com/chinalx1/2326898
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
symfony 的容器是有一个编译过程的,框架初始化的时候会执行Symfony\Component\HttpKernel\Kernel::initializationContainer ,这个方法会对代码进行检查,看是否需要生成新的容器代码。如果需要 Symfony 会将各个类的依赖关系通过编译生成静态的类并存储在缓存文件中var/cache/[ENV]/appProjectContai

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK