December 11, 2009

YAML to the rescue?

Tags: , , , , ,
Filed under: ZenMagick — DerManoMann @ 12:33 am

… yes, YAML to the rescue!

A while ago I was asking for alternative config file formats. I finally seem to have found a strong candidate: YAML!

It’s readable, flexible, supports hierarchical structures and best of all there are pure PHP parsers available!
I’ve picked spyc for some experiments and, in fact, already added that to the repository! spyc seems a very active project and does have good speed.

As a quick test I wrote some debug code to dump the url mappings as YAML. Then, I modified the url mapper to load that mapping using spyc rather than using it’s own mappings. And – voila! It works!

Now I can work on the YAML formatted mappings without having to create nested arrays or anything – what a relief!

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.