ZF: Disable Resource Plugin in application.ini

折月煮酒 提交于 2019-12-06 10:39:51

Try

resources.cachemanager.database.frontend.options.caching = false

See the API and the ZF Reference Guide for the $_options property in Zend_Cache_Core

Like you, I see no obvious way to disable a plugin in a config section that was registered in a parent section. It would be cool if Zend_Config_Ini allowed multiple inheritance, kind of like how an HTML element can multiple CSS classes in the class attribute. (Does it? I'm guessing not). Then you could put the plugin registration into one section [myplugsection], allow [production] to extend [myplug] while [cli] does not, kind of like how Doctrine has actAs templates and beahviors.

The next best thing might be to create a section called something like [core]containing most of what you now habe in [production]. Both [production] and [cli] could extend [core], but [production] would register the plugin while [cli] would not.

Of course, an alternative would be to could move the plugin registration into Bootstrap where you have finer control of the plugin registration. In particular, you can call $front->unregisterPlugin(), where $front is the FrontController.

Just thinking out loud...

Cheers!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!