I am working on re-factoring the code to load the configuration file in PHP. I used to use several "ini" files, but now I plan to move to a single XML file, which will contain all the details of the project configuration. The problem is that if someone needs a configuration file in ini or DB or something else, and not the default (in this case, XML), my code should handle this part.
If someone wants to go to another configuration option, for example, ini, he will have to create an ini file similar to my XML configuration file, and the configuration manager should take care of everything, like parsing, storing in the cache. To do this, I need a mechanism that allows me to say the right interface for my configuration data, where anything can be the base data store (XML, DB, ini, etc.), and I donβt want it to depend on this main store, and at any time in the future it should be extensible for other file formats.
xml php config ini
Jack
source share