Jarekt added a comment.

  I do not speak php, but looking at the code Multichill linked to, it seems 
like the source code for `getEntity `can be found at EntityAccessor.php 
<https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/Wikibase/+/master/client/includes/DataAccess/Scribunto/EntityAccessor.php>
 (line 139) which calls `entityIdParser `to convert string version of entity ID 
to an integer. The code for entityIdParser can be found here 
<https://github.com/wmde/WikibaseDataModel/blob/master/src/Entity/EntityIdParser.php>.
 Interestingly ItemId.php 
<https://github.com/wmde/WikibaseDataModel/blob/master/src/Entity/ItemId.php> 
function checks that entity ID string fits `/^Q[1-9]\d{0,9}\z/i` regex pattern 
and than strips the "Q" from the begging of the string to get the integer. So 
in this code the entity IDs starting with "Q" are hardwired.

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

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

To: Jarekt
Cc: Multichill, Marsupium, Keegan, Jheald, Mike_Peel, Cparle, Aklapper, Jarekt, 
darthmon_wmde, Nandana, JKSTNK, Lahi, PDrouin-WMF, Gq86, E1presidente, 
Ramsey-WMF, Anooprao, SandraF_WMF, GoranSMilovanovic, QZanden, Tramullas, Acer, 
LawExplorer, Salgo60, Silverfish, _jensen, rosalieper, Susannaanas, Jane023, 
Wikidata-bugs, Base, matthiasmullie, aude, Ricordisamoa, Wesalius, 
Lydia_Pintscher, Fabrice_Florin, Raymond, Steinsplitter, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to