简体   繁体   中英

Zend Framework Dependency Injection vs Symfony2 Dependency Injection

I've been using Symfony2 DI a lot for some of my projects recently, and just started trying Zend DI. What I can see is SYmfony2 DI is a lot better than Zend DI as it also provides the following features which don't exist in Zend DI:

  • Configure the services using XML, YML, PHP,...
  • Tag feature
  • Event/Dispatcher

Please correct me if i'm wrong?

  • AFAIK zend DI can be fileld from any format that can return an array (XML, INI, YMP, PHP, NEON, even CSV maybe :D)
  • what does that do?
  • ZF2 has a powerful EventManager and Dispatching is also set up in the DI config - anything implementing Dispatchable interface can be dispatched - but I can't see how Events and Dispatching relates to DI implementation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM