i was reading Zend Framework Book: Survive the Deep End about resource methods. it speaks about how resource methods will override resource plugin.
But wait, there's also a Resource Plugin (Zend_Application_Resource_View) which may also create a Resource called View. Can we have two View Resources? The answer is no - we can have one and one only
a good way to create re-usable bootstrap resources and to offload much of your coding to discrete classes is to utilize resource plugins ... the intention is that developers should write their own to encapsulate their own initialization needs
to me, resource methods seem like a more intuitive way to initialize resources, why then should I use plugins? is it just a question of which do I prefer? or are they used in different circumstances?
will resource methods replace or add to the functionality provided by the provided resource plugins? because if it replaces, I would need to make sure i initialize all variables or whatever I need?
By returning the new Zend_View instance from _initView(), Zend_Application will accept the replacement and will not attempt to overwrite our changes by running Zend_Application_Resource_View to set up a standard default Zend_View instance with the flaws we just corrected
if I dont return a Zend_View
, it will be as if I didn't have the method? can I say that I should always return something from resource methods?
Here, we do the same thing by using the getResource() method to retrieve an instance of Zend_Controller_Front created and configured by Zend_Application_Resource_Frontcontroller
from the above, can i say that if i want my resource methods to have the defaults set by the provided resource plugin, i can do a getResource()
1st?