November 16, 2009

looking for a simple config file format

Filed under: General,PHP,ZenMagick — DerManoMann @ 11:10 pm

One of the things on my todo list for ZenMagick is to review the different types of config/option/setting formats used. Right now there are:

  • plain PHP with static code
    This is handled via the loader and the most prominent special cases here are local.php files which are fine, though
  • PHP code without the <?phph ?> tags
    Used for the database mappings – this should/could be nicer I guess, in particular since it might get cached as serialized array anyway
  • list of method calls in a single global function
    Done for the sacs and url mappings. These could be a single array and perhaps should be. However, it would be nice to have a simple format that can easily be parsed

So, what do I want/need? .ini fileformat is too simple as there is some hierarchical data, although not too deep. Some nesting would be good too.

Of course, XML might be an idea, however I do not have any experience with XML and PHP and do not know what performance is like.

Any ideas?

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.