Hey,
Suggestion: you could use the validator extension [0] instead of re-inventing the wheel in [1].
TL;DR: It's a declarative parameter processing framework written as MediaWiki extension and used by several other MediaWiki extensions.
The documentation on mw.org is outdated (the parameter definition syntax and overall architecture changed quite a bit) but the basic idea remains the same. The latest code is on the 1.0.x branch [2] and is going to be merged into master as soon as the Maps extension is made compatible with the new version. The code on the 1.0.x makes use of the DataValues and associated extensions being developed for the Wikidata project. If you then also consider the other extensions already using this I think it's pretty safe to say this is going to keep being maintained and get more features, thus has a huge advantage over doing something similar on your own.
[0] https://www.mediawiki.org/wiki/Extension:Validator [1] https://github.com/Seizam/seizamcore/tree/master/WikiZam/extensions/WidgetsF... [2] https://github.com/wikimedia/mediawiki-extensions-Validator/tree/1.0.x
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --