OOP interface for creating MediaWiki parser hooks in a declarative fashion