What the logic behind config files being classes? |
(04-21-2016, 05:20 AM)sv3tli0 Wrote: I don't think that there is huge difference between class / object / array configs. That "config" file acts more like a factory than a standard config file, and the static methods aid in usability. Services::routes() vs new Config\Services()->routes(); Static methods are not always evil, not matter what the internet might like to say. They just make testing a little more difficult. For cases like these, they work great. (04-21-2016, 05:20 AM)sv3tli0 Wrote: And its a little bit of strange to have such important things outside the system. As I see it, it is +1 dependency for the system to work. I believe we've had this discussion before.... but we allow the application folder to act as a namespace, and we allow that namespace to be changed by the user. The only clean way to do that is to have Config always stay the same so system files can find it. |
Welcome Guest, Not a member yet? Register Sign In |