YAML to the rescue?
… 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!
