Reputation:
What is the best practice regarding configuration for different Classes in yml config files in Silverstripe? Specifically is it advisable to access more than one class within a yml file?
Upvotes: 1
Views: 61
Reputation: 11
Entirely up to the developer. My personal opinion would be that having a config per class would be a bit over the top, and become overloaded with many files doing not much, making maintenance a problematic experience.
I think generally a single config file per project (read: module, etc) is quite acceptable. Or, if that's a bit messy and verbose, then a config file per major concern in that project, eg. one for routes, and one for general configuration.
Such as basically the way it is already done with CMS, et al.
Upvotes: 1