Use Zend Framework components without the actual framework?

前端 未结 3 824
栀梦
栀梦 2021-01-12 11:00

I was wondering if anyone knew how to use some components of the Zend Framework without having to actually use the framework. For example, I would like to use their Zend_Va

3条回答
  •  猫巷女王i
    2021-01-12 11:37

    Zend framework components while being loosely couple are still coupled. If you would to use Zend_Mail component for example - that would actually also require:

    1. Zend_Mime
    2. Zend_Exception
    3. Zend_Validation

    Zend_Validation will be loaded for the mere reason of validating email address domain.

    So - best bet would be to include entire Zend library. By pulling only several components - you'll soon end up in "dependency hell" especially as API changes (though that doesn't happen too often).

    Also - starting from version 2.0 you must use some auto-loader to load Zend components as all require calls will be removed from PHP classes.

提交回复
热议问题