How to use dependency injection in Zend Framework?

前端 未结 5 761
攒了一身酷
攒了一身酷 2021-02-02 14:52

Currently I am trying to learn the Zend Framework and therefore I bought the book \"Zend Framework in Action\".

In chapter 3, a basic model and controller is introduced

5条回答
  •  独厮守ぢ
    2021-02-02 15:18

    You could also just use the PHP-DI ZF bridge: http://php-di.org/doc/frameworks/zf1.html

    I know this question is really old but it pops up rather high in search engines when looking for DI in ZF1 so I thought I'd add a solution that doesn't require you to write it all by yourself.

提交回复
热议问题