We need a mechanism for registering new entity types, to work with things like EntityViewFactory. We also have things like ActionOverrides registered in each ContentHandler class, but these could benefit from instead being callbacks and thus maybe belong in a factory as well.
for content model mappings, we have:
public function getContentModelMappings() {
// @TODO: We should have smth. like this for namespaces too
$map = array(
Item::ENTITY_TYPE => CONTENT_MODEL_WIKIBASE_ITEM,
Property::ENTITY_TYPE => CONTENT_MODEL_WIKIBASE_PROPERTY
);
wfRunHooks( 'WikibaseContentModelMapping', array( &$map ) );
return $map;
}Would we want more hooks like these to achieve this, or some sort of registry (at least factor out all these related methods from the top level factory)?