So, I'd like to add a little block of attribution data to each page (optional, per-installation; I'm guessing Wikipedia wouldn't use this). Something along the lines of:
This article last edited on April 21, 2004 by Evan Prodromou. Based on work by Alice Notaperson, Bob Alsonotaperson, users Crankshaft, Deckchair and Eggplant, and anonymous editors.
For each (distinct) person who's listed in the old table, it'd show their real name if it's set, or their user name if not. All anonymous edits would be lumped under "anonymous editors". Contributors would be listed with real-named folks first, then pseudo'd folks, then anonymous. There's no particular reason for that; it could be any other way (although I don't see a big point making it configurable).
The goal here is to make it easy for redistributors to comply with license provisions that require author attribution (such as some Creative Commons licenses), without having to dig through a whole bunch of history pages.
Anyhoo, the Metadata.php code already does most of this logic, albeit for output in RDF format. I'd like to take that stuff and put it in the Article class, in a method like "getContributors". The method could then be used both from the attribution code and from the RDF metadata code.
getContributors would return an array of arrays, each of which would contain:
0. User ID 1. User account name 2. User real name, if set
Another option would be to create User objects for each entry in the returned array, but a) I don't think that most of the User object fields (email, preferences) are needed, and b) I'd be worried about slingin' around incomplete User objects. So, I think the arrays are the best bet.
Does returning an array of arrays seem insane? Would it be wrong to add this method to Article? If so, where else would it go?
~ESP