I'm not clear on the difference between creating another _init method within the bootstrap to initialize a resource as opposed to creating a resource class and adding it to the configuration file to be loaded by the bootstrap? Thanks in advance for taking time out of your day to check out my question. Cheers!
Well that's just about flexibility, using a Resource will provide you a more generic object which will fit most of your need for common services while _init methods are likely to be specific and short.
Resources allows you to automatically load config object from the configuration file, while _init methods will ask you to do it manually.
There is no real difference except the way you work with.
Note : _init method with the same names as native resoures will overwrite current configuration.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.