Configuration manager for PHP

Posted by Jack on Stack Overflow See other posts from Stack Overflow or by Jack
Published on 2010-03-18T17:03:27Z Indexed on 2010/03/18 17:31 UTC
Read the original article Hit count: 331

Filed under:
|
|
|

I am working on code re-factoring of configuration file loading part in PHP. Earlier I was using multiple 'ini' files but now I plan to go for single XML file which will be containing all configuration details of the project. Problem is, if somebody wants configuration file in ini or DB or anything else and not the default one (in this case XML), my code should handle that part.

If somebody wants to go for other configuration option like ini, he will have to create ini file similar to my XML configuration file and my configuration manager should take care everything like parsing, storing in cache. For that I need a mechanism lets say proper interface for my configuration data where the underlying data store can be anything( XML, DB, ini etc) also I don't want it to be dependent on these underlying store and anytime in future this should be extensible to other file formats.

© Stack Overflow or respective owner

Related posts about php

Related posts about config