I was reading about the resource methods. This explains how resource methods override resource resources.
But wait, there is also a Resource Plugin (Zend_Application_Resource_View) which can create a resource called the View. Do we have two visual resources? The answer is no - we have much to offload to make another one may be
,
qualified bootstrap resources to use again and a good way to use your coding processing plugins for discrete sections ... the intention is that developers need to start their own for their I
here to encapsulate for Should write, resource methods of a more comfortable way To start looking like resources, why should I use plugins? Is this just a question that I like? Or are they used in different circumstances?
Will the resource methods change or add to the functionality provided by the resource plugins provided? Because if it changes, I'll need to make sure that I start the all variable or whatever I need?
The _initView () to return the new Zend_View instance, will accept Zend_Application replacement Zend_Application_Resource_View not running effort to establish a standard default Zend_View instance with loopholes to overwrite our changes We just do not return
If I do not return Zend_View , will it be that I have no way? I can say that I should always return something in processing methods?
Here, we getResource () is designed to do the same thing by to retrieve an instance of Zend_Controller_Front using the method and configured by Zend_Application_Resource_Frontcontroller
From above, I can say that the resource provided by the resource is determined by the plugin to do its resource methods if I want, can I get a getResource () 1?
Answer your questions:
Do I have to type the resource plugins or Methods should be used?
I would say that it is largely down to personal preference as your bid manually, if you use a resource plugin, code reuse in another project It is easy to do (because it is easy to solve / test the class instead of 'pasting' text from any method). In my opinion, it is a bit easier to see what is happening in Bootstrap, at least as long as they do not begin to become a bit complicated, in this case it means to convert them into a plugin.
Will resource processing methods or resources add to the functionality provided by plugins?
I believe that the way this works is that plug-ins are loaded and initialised when Bootstrap class is instantiated first. Then Bootstrap passes through your methods and runs them. If identically named method have plugins resource, your system should be able to override the plugin though you can access from your system to the existing resource and modify it, in which case provided by your system plugin Adding to functionality.
Remember that plug-ins do not magically run by themselves (apart from the front controller plugin, which will always run). They can only be used if your application.ini triggers them (or if you call them in their own way).
If I do not return a Zend_View, it would be as if I did not have the method? Can I say that I should always return something to the resource methods?
This is good practice to back something from the resource methods because it applications other methods or other parts. Although the method will still run without return value. But if you've added a _initView method and set up a new Zend_View object, if you do not do anything with it, then there will be no effect on your application.
Can I say if I want my resource methods for basic resources fixed by the resource resource plugin provided, I can get a getResource ()
Yes but I make sure that you withdraw the resources in this matter, just so that any other methods using resources are using your modified app instead of a setup by the plugin.
Personally, I have either the Application.ini + resource plug-in, or the resource method, it is easy to see whether all the resources are in one place.
Comments
Post a Comment