daniel added a comment.

One way to go about this is to add factory methods for all the relevant 
services to the EntityHandler sublcass for the respective entity type. Since 
MediaWiki already has a registry for ContentHandlers, and each entity type is 
bound to a content model, this should work fine. All that is needed at the root 
is a list of all relevant content models, this already exists, and can be 
modified via the WikibaseContentModelMapping hook.

However, any entity type specific code needed on the client cannot use this 
mechanism, since the EntityHandler is not (and should not be) present on the 
client. This is true in particular for the serializer and unserializer.


TASK DETAIL
  https://phabricator.wikimedia.org/T76021

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: daniel
Cc: Ricordisamoa, Aklapper, adrianheine, Wikidata-bugs, GPHemsley, thiemowmde, 
JeroenDeDauw, JanZerebecki, aude, Lydia_Pintscher, daniel, hoo, Izno, Mbch331



_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to