Wikibase
MediaWiki Wikibase extension
|
Variables | |
return [VRD::ITEM_ID_REQUEST_VALIDATING_DESERIALIZER=> function():ItemIdRequestValidatingDeserializer { return new ItemIdRequestValidatingDeserializer();}, VRD::PROPERTY_ID_REQUEST_VALIDATING_DESERIALIZER=> function():MappedRequestValidatingDeserializer { $propertyIdValidatingDeserializer=new PropertyIdValidatingDeserializer(new PropertyIdValidator());return new MappedRequestValidatingDeserializer(fn(PropertyIdRequest $r)=> $propertyIdValidatingDeserializer->validateAndDeserialize( $r->getPropertyId()));}, VRD::STATEMENT_ID_REQUEST_VALIDATING_DESERIALIZER=> function():StatementIdRequestValidatingDeserializer { $entityIdParser=new BasicEntityIdParser();return new StatementIdRequestValidatingDeserializer(new StatementIdValidator( $entityIdParser), new StatementGuidParser( $entityIdParser));}, VRD::PROPERTY_ID_FILTER_REQUEST_VALIDATING_DESERIALIZER=> function():MappedRequestValidatingDeserializer { $propertyIdValidatingDeserializer=new PropertyIdValidatingDeserializer(new PropertyIdValidator());return new MappedRequestValidatingDeserializer(fn(PropertyIdFilterRequest $r)=> $r->getPropertyIdFilter()===null ? null :$propertyIdValidatingDeserializer->validateAndDeserialize( $r->getPropertyIdFilter()));}, VRD::SITE_ID_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):SiteIdRequestValidatingDeserializer { return new SiteIdRequestValidatingDeserializer(new SiteIdValidator(WikibaseRepo::getSiteLinkGlobalIdentifiersProvider( $services) ->getList(WikibaseRepo::getSettings( $services) ->getSetting( 'siteLinkGroups'))));}, VRD::LANGUAGE_CODE_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):LanguageCodeRequestValidatingDeserializer { return new LanguageCodeRequestValidatingDeserializer(new LanguageCodeValidator(WikibaseRepo::getTermsLanguages( $services) ->getLanguages()));}, VRD::ITEM_FIELDS_REQUEST_VALIDATING_DESERIALIZER=> function():MappedRequestValidatingDeserializer { $fieldsValidator=new FieldsFilterValidatingDeserializer(ItemParts::VALID_FIELDS);return new MappedRequestValidatingDeserializer(fn(ItemFieldsRequest $r)=> $fieldsValidator->validateAndDeserialize( $r->getItemFields()));}, VRD::PROPERTY_FIELDS_REQUEST_VALIDATING_DESERIALIZER=> function():MappedRequestValidatingDeserializer { $fieldsValidator=new FieldsFilterValidatingDeserializer(PropertyParts::VALID_FIELDS);return new MappedRequestValidatingDeserializer(fn(PropertyFieldsRequest $r)=> $fieldsValidator->validateAndDeserialize( $r->getPropertyFields()));}, VRD::STATEMENT_SERIALIZATION_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):StatementSerializationRequestValidatingDeserializer { return new StatementSerializationRequestValidatingDeserializer(new StatementValidator(WbRestApi::getStatementDeserializer( $services)));}, VRD::EDIT_METADATA_REQUEST_VALIDATING_DESERIALIZER=> function():EditMetadataRequestValidatingDeserializer { return new EditMetadataRequestValidatingDeserializer(new EditMetadataValidator(CommentStore::COMMENT_CHARACTER_LIMIT, ChangeTags::listExplicitlyDefinedTags()));}, VRD::PATCH_REQUEST_VALIDATING_DESERIALIZER=> function():PatchRequestValidatingDeserializer { return new PatchRequestValidatingDeserializer(new JsonDiffJsonPatchValidator());}, VRD::ITEM_LABEL_EDIT_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):ItemLabelEditRequestValidatingDeserializer { return new ItemLabelEditRequestValidatingDeserializer(new LabelTextValidatorItemLabelValidator(new TermValidatorFactoryLabelTextValidator(WikibaseRepo::getTermValidatorFactory( $services)), WikibaseRepo::getItemTermsCollisionDetector( $services), WbRestApi::getItemDataRetriever( $services)));}, VRD::ITEM_DESCRIPTION_EDIT_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):ItemDescriptionEditRequestValidatingDeserializer { return new ItemDescriptionEditRequestValidatingDeserializer(new TermValidatorFactoryItemDescriptionValidator(WikibaseRepo::getTermValidatorFactory( $services), WikibaseRepo::getItemTermsCollisionDetector( $services), WbRestApi::getItemDataRetriever( $services)));}, VRD::ITEM_ALIASES_IN_LANGUAGE_EDIT_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):ItemAliasesInLanguageEditRequestValidatingDeserializer { return new ItemAliasesInLanguageEditRequestValidatingDeserializer(new TermValidatorFactoryAliasesInLanguageValidator(WikibaseRepo::getTermValidatorFactory( $services)), new AliasesDeserializer(), new PrefetchingTermLookupAliasesRetriever(WikibaseRepo::getPrefetchingTermLookup( $services), WikibaseRepo::getTermsLanguages( $services)));}, VRD::PROPERTY_LABEL_EDIT_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):PropertyLabelEditRequestValidatingDeserializer { return new PropertyLabelEditRequestValidatingDeserializer(new TermValidatorFactoryPropertyLabelValidator(WikibaseRepo::getTermValidatorFactory( $services), WikibaseRepo::getPropertyTermsCollisionDetector( $services), WbRestApi::getPropertyDataRetriever( $services)));}, VRD::PROPERTY_DESCRIPTION_EDIT_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):PropertyDescriptionEditRequestValidatingDeserializer { return new PropertyDescriptionEditRequestValidatingDeserializer(new TermValidatorFactoryPropertyDescriptionValidator(WikibaseRepo::getTermValidatorFactory( $services), WbRestApi::getPropertyDataRetriever( $services)));}, VRD::PROPERTY_ALIASES_IN_LANGUAGE_EDIT_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):PropertyAliasesInLanguageEditRequestValidatingDeserializer { return new PropertyAliasesInLanguageEditRequestValidatingDeserializer(new TermValidatorFactoryAliasesInLanguageValidator(WikibaseRepo::getTermValidatorFactory( $services)), new AliasesDeserializer(), new PrefetchingTermLookupAliasesRetriever(WikibaseRepo::getPrefetchingTermLookup( $services), WikibaseRepo::getTermsLanguages( $services)));}, VRD::SITELINK_EDIT_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):SitelinkEditRequestValidatingDeserializer { return new SitelinkEditRequestValidatingDeserializer(new SiteLinkConflictLookupSitelinkValidator(WbRestApi::getSitelinkDeserializer( $services), new SqlSiteLinkConflictLookup(WikibaseRepo::getRepoDomainDbFactory( $services) ->newRepoDb(), WikibaseRepo::getEntityIdComposer( $services)),),);}, VRD::ITEM_SERIALIZATION_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):ItemSerializationRequestValidatingDeserializer { $termValidatorFactory=WikibaseRepo::getTermValidatorFactory( $services);return new ItemSerializationRequestValidatingDeserializer(new ItemDeserializerItemValidator(WbRestApi::getItemDeserializer( $services), new LanguageCodeValidator(WikibaseRepo::getTermsLanguages( $services) ->getLanguages()), new TermValidatorFactoryLabelTextValidator( $termValidatorFactory), WikibaseRepo::getItemTermsCollisionDetector( $services)));}, 'WbRestApi.AddItemAliasesInLanguage'=> function(MediaWikiServices $services):AddItemAliasesInLanguage { return new AddItemAliasesInLanguage(WbRestApi::getItemDataRetriever( $services), WbRestApi::getAssertItemExists( $services), WbRestApi::getAssertUserIsAuthorized( $services), WbRestApi::getItemUpdater( $services), WbRestApi::getValidatingRequestDeserializer( $services));}, 'WbRestApi.AddItemStatement'=> function(MediaWikiServices $services):AddItemStatement { return new AddItemStatement(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertItemExists( $services), WbRestApi::getItemDataRetriever( $services), WbRestApi::getItemUpdater( $services), new GuidGenerator(), WbRestApi::getAssertUserIsAuthorized( $services));}, 'WbRestApi.AddPropertyAliasesInLanguage'=> function(MediaWikiServices $services):AddPropertyAliasesInLanguage { return new AddPropertyAliasesInLanguage(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertPropertyExists( $services), WbRestApi::getAssertUserIsAuthorized( $services), WbRestApi::getPropertyDataRetriever( $services), WbRestApi::getPropertyUpdater( $services),);}, 'WbRestApi.AddPropertyStatement'=> function(MediaWikiServices $services):AddPropertyStatement { $statementReadModelConverter=new StatementReadModelConverter(WikibaseRepo::getStatementGuidParser( $services), WikibaseRepo::getPropertyDataTypeLookup( $services));return new AddPropertyStatement(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertPropertyExists( $services), new EntityRevisionLookupPropertyDataRetriever(WikibaseRepo::getEntityRevisionLookup( $services), $statementReadModelConverter), new GuidGenerator(), WbRestApi::getPropertyUpdater( $services), new AssertUserIsAuthorized(new WikibaseEntityPermissionChecker(WikibaseRepo::getEntityPermissionChecker( $services), $services->getUserFactory())));}, 'WbRestApi.AssertItemExists'=> function(MediaWikiServices $services):AssertItemExists { return new AssertItemExists(WbRestApi::getGetLatestItemRevisionMetadata( $services));}, 'WbRestApi.AssertPropertyExists'=> function(MediaWikiServices $services):AssertPropertyExists { return new AssertPropertyExists(WbRestApi::getGetLatestPropertyRevisionMetadata( $services));}, 'WbRestApi.AssertStatementSubjectExists'=> function(MediaWikiServices $services):AssertStatementSubjectExists { return new AssertStatementSubjectExists(WbRestApi::getGetLatestStatementSubjectRevisionMetadata( $services));}, 'WbRestApi.AssertUserIsAuthorized'=> function(MediaWikiServices $services):AssertUserIsAuthorized { return new AssertUserIsAuthorized(new WikibaseEntityPermissionChecker(WikibaseRepo::getEntityPermissionChecker( $services), $services->getUserFactory()));}, 'WbRestApi.CreateItem'=> function(MediaWikiServices $services):CreateItem { return new CreateItem(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getItemUpdater( $services), WbRestApi::getAssertUserIsAuthorized( $services));}, 'WbRestApi.EntityUpdater'=> function(MediaWikiServices $services):EntityUpdater { return new EntityUpdater(RequestContext::getMain(), WikibaseRepo::getEditEntityFactory( $services), WikibaseRepo::getLogger( $services), new EditSummaryFormatter(WikibaseRepo::getSummaryFormatter( $services), new TermsEditSummaryToFormattableSummaryConverter(), new FullEntityEditSummaryToFormattableSummaryConverter()), $services->getPermissionManager(), WikibaseRepo::getEntityStore( $services), new GuidGenerator());}, 'WbRestApi.ErrorReporter'=> function(MediaWikiServices $services):ErrorReporter { return new MWErrorReporter();}, 'WbRestApi.GetItem'=> function(MediaWikiServices $services):GetItem { return new GetItem(WbRestApi::getGetLatestItemRevisionMetadata( $services), WbRestApi::getItemDataRetriever( $services), WbRestApi::getValidatingRequestDeserializer( $services));}, 'WbRestApi.GetItemAliases'=> function(MediaWikiServices $services):GetItemAliases { return new GetItemAliases(WbRestApi::getGetLatestItemRevisionMetadata( $services), new PrefetchingTermLookupAliasesRetriever(WikibaseRepo::getPrefetchingTermLookup( $services), WikibaseRepo::getTermsLanguages( $services)), WbRestApi::getValidatingRequestDeserializer( $services));}, 'WbRestApi.GetItemAliasesInLanguage'=> function(MediaWikiServices $services):GetItemAliasesInLanguage { return new GetItemAliasesInLanguage(WbRestApi::getGetLatestItemRevisionMetadata( $services), new PrefetchingTermLookupAliasesRetriever(WikibaseRepo::getPrefetchingTermLookup( $services), WikibaseRepo::getTermsLanguages( $services)), WbRestApi::getValidatingRequestDeserializer( $services));}, 'WbRestApi.GetItemDescription'=> function(MediaWikiServices $services):GetItemDescription { return new GetItemDescription(WbRestApi::getGetLatestItemRevisionMetadata( $services), WbRestApi::getTermLookupEntityTermsRetriever( $services), WbRestApi::getValidatingRequestDeserializer( $services));}, 'WbRestApi.GetItemDescriptions'=> function(MediaWikiServices $services):GetItemDescriptions { return new GetItemDescriptions(WbRestApi::getGetLatestItemRevisionMetadata( $services), WbRestApi::getTermLookupEntityTermsRetriever( $services), WbRestApi::getValidatingRequestDeserializer( $services));}, 'WbRestApi.GetItemLabel'=> function(MediaWikiServices $services):GetItemLabel { return new GetItemLabel(WbRestApi::getGetLatestItemRevisionMetadata( $services), WbRestApi::getTermLookupEntityTermsRetriever( $services), WbRestApi::getValidatingRequestDeserializer( $services));}, 'WbRestApi.GetItemLabels'=> function(MediaWikiServices $services):GetItemLabels { return new GetItemLabels(WbRestApi::getGetLatestItemRevisionMetadata( $services), WbRestApi::getTermLookupEntityTermsRetriever( $services), WbRestApi::getValidatingRequestDeserializer( $services));}, 'WbRestApi.GetItemStatement'=> function(MediaWikiServices $services):GetItemStatement { return new GetItemStatement(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertItemExists( $services), WbRestApi::getGetStatement( $services));}, 'WbRestApi.GetItemStatements'=> function(MediaWikiServices $services):GetItemStatements { return new GetItemStatements(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getItemDataRetriever( $services), WbRestApi::getGetLatestItemRevisionMetadata( $services));}, 'WbRestApi.GetLatestItemRevisionMetadata'=> function(MediaWikiServices $services):GetLatestItemRevisionMetadata { return new GetLatestItemRevisionMetadata(new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever(WikibaseRepo::getEntityRevisionLookup( $services)));}, 'WbRestApi.GetLatestPropertyRevisionMetadata'=> function(MediaWikiServices $services):GetLatestPropertyRevisionMetadata { return new GetLatestPropertyRevisionMetadata(new WikibaseEntityRevisionLookupPropertyRevisionMetadataRetriever(WikibaseRepo::getEntityRevisionLookup( $services)));}, 'WbRestApi.GetLatestStatementSubjectRevisionMetadata'=> function(MediaWikiServices $services):GetLatestStatementSubjectRevisionMetadata { return new GetLatestStatementSubjectRevisionMetadata(new WikibaseEntityRevisionLookupStatementSubjectRevisionMetadataRetriever(WikibaseRepo::getEntityRevisionLookup( $services)));}, 'WbRestApi.GetProperty'=> function(MediaWikiServices $services):GetProperty { return new GetProperty(WbRestApi::getGetLatestPropertyRevisionMetadata( $services), WbRestApi::getPropertyDataRetriever( $services), WbRestApi::getValidatingRequestDeserializer( $services));}, 'WbRestApi.GetPropertyAliases'=> function(MediaWikiServices $services):GetPropertyAliases { return new GetPropertyAliases(WbRestApi::getGetLatestPropertyRevisionMetadata( $services), new PrefetchingTermLookupAliasesRetriever(WikibaseRepo::getPrefetchingTermLookup( $services), WikibaseRepo::getTermsLanguages( $services)), WbRestApi::getValidatingRequestDeserializer( $services));}, 'WbRestApi.GetPropertyAliasesInLanguage'=> function(MediaWikiServices $services):GetPropertyAliasesInLanguage { return new GetPropertyAliasesInLanguage(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getGetLatestPropertyRevisionMetadata( $services), new PrefetchingTermLookupAliasesRetriever(WikibaseRepo::getPrefetchingTermLookup( $services), WikibaseRepo::getTermsLanguages( $services)));}, 'WbRestApi.GetPropertyDescription'=> function(MediaWikiServices $services):GetPropertyDescription { return new GetPropertyDescription(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getGetLatestPropertyRevisionMetadata( $services), WbRestApi::getTermLookupEntityTermsRetriever( $services));}, 'WbRestApi.GetPropertyDescriptions'=> function(MediaWikiServices $services):GetPropertyDescriptions { return new GetPropertyDescriptions(WbRestApi::getGetLatestPropertyRevisionMetadata( $services), WbRestApi::getTermLookupEntityTermsRetriever( $services), WbRestApi::getValidatingRequestDeserializer( $services));}, 'WbRestApi.GetPropertyLabel'=> function(MediaWikiServices $services):GetPropertyLabel { return new GetPropertyLabel(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getGetLatestPropertyRevisionMetadata( $services), WbRestApi::getTermLookupEntityTermsRetriever( $services));}, 'WbRestApi.GetPropertyLabels'=> function(MediaWikiServices $services):GetPropertyLabels { return new GetPropertyLabels(WbRestApi::getGetLatestPropertyRevisionMetadata( $services), WbRestApi::getTermLookupEntityTermsRetriever( $services), WbRestApi::getValidatingRequestDeserializer( $services));}, 'WbRestApi.GetPropertyStatement'=> function(MediaWikiServices $services):GetPropertyStatement { return new GetPropertyStatement(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertPropertyExists( $services), WbRestApi::getGetStatement( $services));}, 'WbRestApi.GetPropertyStatements'=> function(MediaWikiServices $services):GetPropertyStatements { return new GetPropertyStatements(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getPropertyDataRetriever( $services), WbRestApi::getGetLatestPropertyRevisionMetadata( $services));}, 'WbRestApi.GetSitelink'=> function(MediaWikiServices $services):GetSitelink { return new GetSitelink(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getGetLatestItemRevisionMetadata( $services), WbRestApi::getItemDataRetriever( $services),);}, 'WbRestApi.GetSitelinks'=> function(MediaWikiServices $services):GetSitelinks { return new GetSitelinks(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getGetLatestItemRevisionMetadata( $services), WbRestApi::getItemDataRetriever( $services),);}, 'WbRestApi.GetStatement'=> function(MediaWikiServices $services):GetStatement { return new GetStatement(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getStatementRetriever( $services), WbRestApi::getGetLatestStatementSubjectRevisionMetadata( $services));}, 'WbRestApi.ItemDataRetriever'=> function(MediaWikiServices $services):EntityRevisionLookupItemDataRetriever { return new EntityRevisionLookupItemDataRetriever(WikibaseRepo::getEntityRevisionLookup( $services), new StatementReadModelConverter(WikibaseRepo::getStatementGuidParser( $services), WikibaseRepo::getPropertyDataTypeLookup( $services)), new SitelinksReadModelConverter( $services->getSiteLookup()));}, 'WbRestApi.ItemDeserializer'=> function(MediaWikiServices $services) { return new ItemDeserializer(new LabelsDeserializer(), new DescriptionsDeserializer(), new AliasesDeserializer(), new SitelinksDeserializer(WbRestApi::getSitelinkDeserializer( $services)), new StatementsDeserializer(WbRestApi::getStatementDeserializer( $services)));}, 'WbRestApi.ItemUpdater'=> function(MediaWikiServices $services):EntityUpdaterItemUpdater { return new EntityUpdaterItemUpdater(WbRestApi::getEntityUpdater( $services), new SitelinksReadModelConverter( $services->getSiteLookup()), new StatementReadModelConverter(WikibaseRepo::getStatementGuidParser( $services), WikibaseRepo::getPropertyDataTypeLookup( $services)));}, 'WbRestApi.PatchItemAliases'=> function(MediaWikiServices $services):PatchItemAliases { return new PatchItemAliases(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertItemExists( $services), WbRestApi::getAssertUserIsAuthorized( $services), new PrefetchingTermLookupAliasesRetriever(WikibaseRepo::getPrefetchingTermLookup( $services), WikibaseRepo::getTermsLanguages( $services)), new AliasesSerializer(), new PatchJson(new JsonDiffJsonPatcher()), new PatchedItemAliasesValidator(new AliasesDeserializer(), new TermValidatorFactoryAliasesInLanguageValidator(WikibaseRepo::getTermValidatorFactory( $services)), new LanguageCodeValidator(WikibaseRepo::getTermsLanguages( $services) ->getLanguages())), WbRestApi::getItemDataRetriever( $services), WbRestApi::getItemUpdater( $services));}, 'WbRestApi.PatchItemDescriptions'=> function(MediaWikiServices $services):PatchItemDescriptions { return new PatchItemDescriptions(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertItemExists( $services), WbRestApi::getAssertUserIsAuthorized( $services), WbRestApi::getTermLookupEntityTermsRetriever( $services), new DescriptionsSerializer(), new PatchJson(new JsonDiffJsonPatcher()), WbRestApi::getItemDataRetriever( $services), new PatchedDescriptionsValidator(new DescriptionsDeserializer(), new TermValidatorFactoryItemDescriptionValidator(WikibaseRepo::getTermValidatorFactory( $services), WikibaseRepo::getItemTermsCollisionDetector( $services), WbRestApi::getItemDataRetriever( $services)), new LanguageCodeValidator(WikibaseRepo::getTermsLanguages( $services) ->getLanguages())), WbRestApi::getItemUpdater( $services));}, 'WbRestApi.PatchItemLabels'=> function(MediaWikiServices $services):PatchItemLabels { return new PatchItemLabels(WbRestApi::getAssertItemExists( $services), WbRestApi::getTermLookupEntityTermsRetriever( $services), new LabelsSerializer(), new PatchJson(new JsonDiffJsonPatcher()), new PatchedItemLabelsValidator(new LabelsDeserializer(), new LabelTextValidatorItemLabelValidator(new TermValidatorFactoryLabelTextValidator(WikibaseRepo::getTermValidatorFactory( $services)), WikibaseRepo::getItemTermsCollisionDetector( $services), WbRestApi::getItemDataRetriever( $services)), new LanguageCodeValidator(WikibaseRepo::getTermsLanguages( $services) ->getLanguages())), WbRestApi::getItemDataRetriever( $services), WbRestApi::getItemUpdater( $services), WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertUserIsAuthorized( $services));}, 'WbRestApi.PatchItemStatement'=> function(MediaWikiServices $services):PatchItemStatement { return new PatchItemStatement(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertItemExists( $services), WbRestApi::getPatchStatement( $services));}, 'WbRestApi.PatchPropertyAliases'=> function(MediaWikiServices $services):PatchPropertyAliases { $termLanguages=WikibaseRepo::getTermsLanguages( $services);return new PatchPropertyAliases(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertPropertyExists( $services), WbRestApi::getAssertUserIsAuthorized( $services), new PrefetchingTermLookupAliasesRetriever(WikibaseRepo::getPrefetchingTermLookup( $services), $termLanguages), new AliasesSerializer(), new PatchJson(new JsonDiffJsonPatcher()), new PatchedPropertyAliasesValidator(new AliasesDeserializer(), new TermValidatorFactoryAliasesInLanguageValidator(WikibaseRepo::getTermValidatorFactory( $services)), new LanguageCodeValidator( $termLanguages->getLanguages())), WbRestApi::getPropertyDataRetriever( $services), WbRestApi::getPropertyUpdater( $services));}, 'WbRestApi.PatchPropertyDescriptions'=> function(MediaWikiServices $services):PatchPropertyDescriptions { return new PatchPropertyDescriptions(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertPropertyExists( $services), WbRestApi::getAssertUserIsAuthorized( $services), new TermLookupEntityTermsRetriever(WikibaseRepo::getTermLookup( $services), WikibaseRepo::getTermsLanguages( $services)), new DescriptionsSerializer(), new PatchJson(new JsonDiffJsonPatcher()), WbRestApi::getPropertyDataRetriever( $services), new PatchedPropertyDescriptionsValidator(new DescriptionsDeserializer(), new TermValidatorFactoryPropertyDescriptionValidator(WikibaseRepo::getTermValidatorFactory( $services), WbRestApi::getPropertyDataRetriever( $services)), new LanguageCodeValidator(WikibaseRepo::getTermsLanguages( $services) ->getLanguages())), WbRestApi::getPropertyUpdater( $services));}, 'WbRestApi.PatchPropertyLabels'=> function(MediaWikiServices $services):PatchPropertyLabels { return new PatchPropertyLabels(new TermLookupEntityTermsRetriever(WikibaseRepo::getTermLookup( $services), WikibaseRepo::getTermsLanguages( $services)), new LabelsSerializer(), new PatchJson(new JsonDiffJsonPatcher()), WbRestApi::getPropertyDataRetriever( $services), WbRestApi::getPropertyUpdater( $services), WbRestApi::getValidatingRequestDeserializer( $services), new PatchedPropertyLabelsValidator(new LabelsDeserializer(), new TermValidatorFactoryPropertyLabelValidator(WikibaseRepo::getTermValidatorFactory( $services), WikibaseRepo::getPropertyTermsCollisionDetector( $services), WbRestApi::getPropertyDataRetriever( $services)), new LanguageCodeValidator(WikibaseRepo::getTermsLanguages( $services) ->getLanguages())), WbRestApi::getAssertPropertyExists( $services), WbRestApi::getAssertUserIsAuthorized( $services));}, 'WbRestApi.PatchPropertyStatement'=> function(MediaWikiServices $services):PatchPropertyStatement { return new PatchPropertyStatement(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertPropertyExists( $services), WbRestApi::getPatchStatement( $services));}, 'WbRestApi.PatchSitelinks'=> function(MediaWikiServices $services):PatchSitelinks { return new PatchSitelinks(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertItemExists( $services), WbRestApi::getAssertUserIsAuthorized( $services), WbRestApi::getItemDataRetriever( $services), new SitelinksSerializer(new SitelinkSerializer()), new PatchJson(new JsonDiffJsonPatcher()), WbRestApi::getItemDataRetriever( $services), new PatchedSitelinksValidator(new SiteIdValidator(WikibaseRepo::getSiteLinkGlobalIdentifiersProvider( $services) ->getList(WikibaseRepo::getSettings( $services) ->getSetting( 'siteLinkGroups'))), new SiteLinkConflictLookupSitelinkValidator(WbRestApi::getSitelinkDeserializer( $services), new SqlSiteLinkConflictLookup(WikibaseRepo::getRepoDomainDbFactory( $services) ->newRepoDb(), WikibaseRepo::getEntityIdComposer( $services)),),), WbRestApi::getItemUpdater( $services));}, 'WbRestApi.PatchStatement'=> function(MediaWikiServices $services):PatchStatement { return new PatchStatement(WbRestApi::getValidatingRequestDeserializer( $services), new PatchedStatementValidator(new StatementValidator(WbRestApi::getStatementDeserializer( $services))), new PatchJson(new JsonDiffJsonPatcher()), WbRestApi::getStatementSerializer( $services), WbRestApi::getAssertStatementSubjectExists( $services), WbRestApi::getStatementRetriever( $services), WbRestApi::getStatementUpdater( $services), WbRestApi::getAssertUserIsAuthorized( $services));}, 'WbRestApi.PreconditionMiddlewareFactory'=> function(MediaWikiServices $services):PreconditionMiddlewareFactory { return new PreconditionMiddlewareFactory(WikibaseRepo::getEntityRevisionLookup( $services), WikibaseRepo::getEntityIdParser( $services), new ConditionalHeaderUtil());}, 'WbRestApi.PropertyDataRetriever'=> function(MediaWikiServices $services):EntityRevisionLookupPropertyDataRetriever { return new EntityRevisionLookupPropertyDataRetriever(WikibaseRepo::getEntityRevisionLookup( $services), new StatementReadModelConverter(WikibaseRepo::getStatementGuidParser( $services), WikibaseRepo::getPropertyDataTypeLookup( $services)),);}, 'WbRestApi.PropertyUpdater'=> function(MediaWikiServices $services):PropertyUpdater { return new EntityUpdaterPropertyUpdater(WbRestApi::getEntityUpdater( $services), new StatementReadModelConverter(WikibaseRepo::getStatementGuidParser( $services), WikibaseRepo::getPropertyDataTypeLookup( $services)));}, 'WbRestApi.RemoveItemDescription'=> function(MediaWikiServices $services):RemoveItemDescription { return new RemoveItemDescription(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertItemExists( $services), WbRestApi::getAssertUserIsAuthorized( $services), WbRestApi::getItemDataRetriever( $services), WbRestApi::getItemUpdater( $services));}, 'WbRestApi.RemoveItemLabel'=> function(MediaWikiServices $services):RemoveItemLabel { return new RemoveItemLabel(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertItemExists( $services), WbRestApi::getAssertUserIsAuthorized( $services), WbRestApi::getItemDataRetriever( $services), WbRestApi::getItemUpdater( $services));}, 'WbRestApi.RemoveItemStatement'=> function(MediaWikiServices $services):RemoveItemStatement { return new RemoveItemStatement(WbRestApi::getAssertItemExists( $services), WbRestApi::getRemoveStatement( $services), WbRestApi::getValidatingRequestDeserializer( $services));}, 'WbRestApi.RemovePropertyDescription'=> function(MediaWikiServices $services):RemovePropertyDescription { return new RemovePropertyDescription(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertPropertyExists( $services), WbRestApi::getAssertUserIsAuthorized( $services), WbRestApi::getPropertyDataRetriever( $services), WbRestApi::getPropertyUpdater( $services));}, 'WbRestApi.RemovePropertyLabel'=> function(MediaWikiServices $services):RemovePropertyLabel { return new RemovePropertyLabel(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertPropertyExists( $services), WbRestApi::getAssertUserIsAuthorized( $services), WbRestApi::getPropertyDataRetriever( $services), WbRestApi::getPropertyUpdater( $services));}, 'WbRestApi.RemovePropertyStatement'=> function(MediaWikiServices $services):RemovePropertyStatement { return new RemovePropertyStatement(WbRestApi::getAssertPropertyExists( $services), WbRestApi::getRemoveStatement( $services), WbRestApi::getValidatingRequestDeserializer( $services));}, 'WbRestApi.RemoveSitelink'=> function(MediaWikiServices $services):RemoveSitelink { return new RemoveSitelink(WbRestApi::getItemDataRetriever( $services), WbRestApi::getItemUpdater( $services), WbRestApi::getAssertItemExists( $services), WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertUserIsAuthorized( $services));}, 'WbRestApi.RemoveStatement'=> function(MediaWikiServices $services):RemoveStatement { return new RemoveStatement(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertUserIsAuthorized( $services), WbRestApi::getAssertStatementSubjectExists( $services), WbRestApi::getStatementRetriever( $services), WbRestApi::getStatementRemover( $services));}, 'WbRestApi.ReplaceItemStatement'=> function(MediaWikiServices $services):ReplaceItemStatement { return new ReplaceItemStatement(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertItemExists( $services), WbRestApi::getReplaceStatement( $services));}, 'WbRestApi.ReplacePropertyStatement'=> function(MediaWikiServices $services):ReplacePropertyStatement { return new ReplacePropertyStatement(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertPropertyExists( $services), WbRestApi::getReplaceStatement( $services));}, 'WbRestApi.ReplaceStatement'=> function(MediaWikiServices $services):ReplaceStatement { return new ReplaceStatement(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertStatementSubjectExists( $services), WbRestApi::getAssertUserIsAuthorized( $services), WbRestApi::getStatementUpdater( $services));}, 'WbRestApi.SetItemDescription'=> function(MediaWikiServices $services):SetItemDescription { return new SetItemDescription(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertItemExists( $services), WbRestApi::getItemDataRetriever( $services), WbRestApi::getItemUpdater( $services), WbRestApi::getAssertUserIsAuthorized( $services));}, 'WbRestApi.SetItemLabel'=> function(MediaWikiServices $services):SetItemLabel { return new SetItemLabel(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertItemExists( $services), WbRestApi::getItemDataRetriever( $services), WbRestApi::getItemUpdater( $services), WbRestApi::getAssertUserIsAuthorized( $services));}, 'WbRestApi.SetPropertyDescription'=> function(MediaWikiServices $services):SetPropertyDescription { return new SetPropertyDescription(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getPropertyDataRetriever( $services), WbRestApi::getPropertyUpdater( $services), WbRestApi::getAssertPropertyExists( $services), WbRestApi::getAssertUserIsAuthorized( $services));}, 'WbRestApi.SetPropertyLabel'=> function(MediaWikiServices $services):SetPropertyLabel { return new SetPropertyLabel(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getPropertyDataRetriever( $services), WbRestApi::getPropertyUpdater( $services), WbRestApi::getAssertPropertyExists( $services), WbRestApi::getAssertUserIsAuthorized( $services));}, 'WbRestApi.SetSitelink'=> function(MediaWikiServices $services):SetSitelink { return new SetSitelink(WbRestApi::getValidatingRequestDeserializer( $services), WbRestApi::getAssertItemExists( $services), WbRestApi::getAssertUserIsAuthorized( $services), WbRestApi::getItemDataRetriever( $services), WbRestApi::getItemUpdater( $services));}, 'WbRestApi.SitelinkDeserializer'=> function(MediaWikiServices $services):SitelinkDeserializer { return new SitelinkDeserializer(MediaWikiTitleCodec::getTitleInvalidRegex(), array_keys(WikibaseRepo::getSettings( $services) ->getSetting( 'badgeItems')), new SiteLinkPageNormalizerSitelinkTargetResolver($services->getSiteLookup(), WikibaseRepo::getSiteLinkPageNormalizer( $services)), new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever(WikibaseRepo::getEntityRevisionLookup( $services)));}, 'WbRestApi.StatementDeserializer'=> function(MediaWikiServices $services):StatementDeserializer { $entityIdParser=WikibaseRepo::getEntityIdParser( $services);$propertyValuePairDeserializer=new PropertyValuePairDeserializer($entityIdParser, WikibaseRepo::getPropertyDataTypeLookup( $services), new DataValuesValueDeserializer(new DataTypeFactoryValueTypeLookup(WikibaseRepo::getDataTypeFactory( $services)), $entityIdParser, WikibaseRepo::getDataValueDeserializer( $services), WikibaseRepo::getDataTypeValidatorFactory( $services)));return new StatementDeserializer($propertyValuePairDeserializer, new ReferenceDeserializer( $propertyValuePairDeserializer));}, 'WbRestApi.StatementRedirectMiddlewareFactory'=> function(MediaWikiServices $services):StatementRedirectMiddlewareFactory { return new StatementRedirectMiddlewareFactory(WikibaseRepo::getEntityIdParser( $services), new StatementSubjectRetriever(WikibaseRepo::getEntityRevisionLookup( $services)));}, 'WbRestApi.StatementRemover'=> function(MediaWikiServices $services):StatementRemover { return new EntityUpdaterStatementRemover(new StatementSubjectRetriever(WikibaseRepo::getEntityRevisionLookup( $services)), WbRestApi::getEntityUpdater( $services),);}, 'WbRestApi.StatementRetriever'=> function(MediaWikiServices $services):EntityRevisionLookupStatementRetriever { return new EntityRevisionLookupStatementRetriever(new StatementSubjectRetriever(WikibaseRepo::getEntityRevisionLookup( $services)), new StatementReadModelConverter(WikibaseRepo::getStatementGuidParser( $services), WikibaseRepo::getPropertyDataTypeLookup( $services)));}, 'WbRestApi.StatementSerializer'=> function(MediaWikiServices $services):StatementSerializer { $propertyValuePairSerializer=new PropertyValuePairSerializer();$referenceSerializer=new ReferenceSerializer( $propertyValuePairSerializer);return new StatementSerializer( $propertyValuePairSerializer, $referenceSerializer);}, 'WbRestApi.StatementUpdater'=> function(MediaWikiServices $services):StatementUpdater { return new EntityUpdaterStatementUpdater(WikibaseRepo::getStatementGuidParser( $services), new StatementSubjectRetriever(WikibaseRepo::getEntityRevisionLookup( $services)), WbRestApi::getEntityUpdater( $services), new StatementReadModelConverter(WikibaseRepo::getStatementGuidParser( $services), WikibaseRepo::getPropertyDataTypeLookup( $services)));}, 'WbRestApi.TermLookupEntityTermsRetriever'=> function(MediaWikiServices $services):TermLookupEntityTermsRetriever { return new TermLookupEntityTermsRetriever(WikibaseRepo::getTermLookup( $services), WikibaseRepo::getTermsLanguages( $services));}, 'WbRestApi.UnexpectedErrorHandlerMiddleware'=> function(MediaWikiServices $services):UnexpectedErrorHandlerMiddleware { return new UnexpectedErrorHandlerMiddleware(new ResponseFactory(), $services->get( 'WbRestApi.ErrorReporter'), WikibaseRepo::getLogger( $services));}, 'WbRestApi.ValidatingRequestDeserializer'=> function(MediaWikiServices $services):VRD { return new VRD( $services);},] | |
-require-sorted-array | |
return[ VRD::ITEM_ID_REQUEST_VALIDATING_DESERIALIZER=> function():ItemIdRequestValidatingDeserializer { return new ItemIdRequestValidatingDeserializer();}, VRD::PROPERTY_ID_REQUEST_VALIDATING_DESERIALIZER=> function():MappedRequestValidatingDeserializer { $propertyIdValidatingDeserializer=new PropertyIdValidatingDeserializer(new PropertyIdValidator()); return new MappedRequestValidatingDeserializer( fn(PropertyIdRequest $r)=> $propertyIdValidatingDeserializer->validateAndDeserialize($r->getPropertyId()));}, VRD::STATEMENT_ID_REQUEST_VALIDATING_DESERIALIZER=> function():StatementIdRequestValidatingDeserializer { $entityIdParser=new BasicEntityIdParser(); return new StatementIdRequestValidatingDeserializer( new StatementIdValidator($entityIdParser), new StatementGuidParser($entityIdParser));}, VRD::PROPERTY_ID_FILTER_REQUEST_VALIDATING_DESERIALIZER=> function():MappedRequestValidatingDeserializer { $propertyIdValidatingDeserializer=new PropertyIdValidatingDeserializer(new PropertyIdValidator()); return new MappedRequestValidatingDeserializer( fn(PropertyIdFilterRequest $r)=> $r->getPropertyIdFilter()===null ? null :$propertyIdValidatingDeserializer->validateAndDeserialize($r->getPropertyIdFilter()));}, VRD::SITE_ID_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):SiteIdRequestValidatingDeserializer { return new SiteIdRequestValidatingDeserializer( new SiteIdValidator(WikibaseRepo::getSiteLinkGlobalIdentifiersProvider($services) ->getList( WikibaseRepo::getSettings($services) ->getSetting('siteLinkGroups')))); }, VRD::LANGUAGE_CODE_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):LanguageCodeRequestValidatingDeserializer { return new LanguageCodeRequestValidatingDeserializer( new LanguageCodeValidator(WikibaseRepo::getTermsLanguages($services) ->getLanguages())); }, VRD::ITEM_FIELDS_REQUEST_VALIDATING_DESERIALIZER=> function():MappedRequestValidatingDeserializer { $fieldsValidator=new FieldsFilterValidatingDeserializer(ItemParts::VALID_FIELDS); return new MappedRequestValidatingDeserializer( fn(ItemFieldsRequest $r)=> $fieldsValidator->validateAndDeserialize($r->getItemFields()));}, VRD::PROPERTY_FIELDS_REQUEST_VALIDATING_DESERIALIZER=> function():MappedRequestValidatingDeserializer { $fieldsValidator=new FieldsFilterValidatingDeserializer(PropertyParts::VALID_FIELDS); return new MappedRequestValidatingDeserializer( fn(PropertyFieldsRequest $r)=> $fieldsValidator->validateAndDeserialize($r->getPropertyFields()));}, VRD::STATEMENT_SERIALIZATION_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):StatementSerializationRequestValidatingDeserializer { return new StatementSerializationRequestValidatingDeserializer( new StatementValidator(WbRestApi::getStatementDeserializer($services))); }, VRD::EDIT_METADATA_REQUEST_VALIDATING_DESERIALIZER=> function():EditMetadataRequestValidatingDeserializer { return new EditMetadataRequestValidatingDeserializer( new EditMetadataValidator( CommentStore::COMMENT_CHARACTER_LIMIT, ChangeTags::listExplicitlyDefinedTags()));}, VRD::PATCH_REQUEST_VALIDATING_DESERIALIZER=> function():PatchRequestValidatingDeserializer { return new PatchRequestValidatingDeserializer(new JsonDiffJsonPatchValidator());}, VRD::ITEM_LABEL_EDIT_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):ItemLabelEditRequestValidatingDeserializer { return new ItemLabelEditRequestValidatingDeserializer( new LabelTextValidatorItemLabelValidator( new TermValidatorFactoryLabelTextValidator(WikibaseRepo::getTermValidatorFactory($services)), WikibaseRepo::getItemTermsCollisionDetector($services), WbRestApi::getItemDataRetriever($services))); }, VRD::ITEM_DESCRIPTION_EDIT_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):ItemDescriptionEditRequestValidatingDeserializer { return new ItemDescriptionEditRequestValidatingDeserializer( new TermValidatorFactoryItemDescriptionValidator( WikibaseRepo::getTermValidatorFactory($services), WikibaseRepo::getItemTermsCollisionDetector($services), WbRestApi::getItemDataRetriever($services))); }, VRD::ITEM_ALIASES_IN_LANGUAGE_EDIT_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):ItemAliasesInLanguageEditRequestValidatingDeserializer { return new ItemAliasesInLanguageEditRequestValidatingDeserializer( new TermValidatorFactoryAliasesInLanguageValidator(WikibaseRepo::getTermValidatorFactory($services)), new AliasesDeserializer(), new PrefetchingTermLookupAliasesRetriever( WikibaseRepo::getPrefetchingTermLookup($services), WikibaseRepo::getTermsLanguages($services))); }, VRD::PROPERTY_LABEL_EDIT_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):PropertyLabelEditRequestValidatingDeserializer { return new PropertyLabelEditRequestValidatingDeserializer( new TermValidatorFactoryPropertyLabelValidator( WikibaseRepo::getTermValidatorFactory($services), WikibaseRepo::getPropertyTermsCollisionDetector($services), WbRestApi::getPropertyDataRetriever($services))); }, VRD::PROPERTY_DESCRIPTION_EDIT_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):PropertyDescriptionEditRequestValidatingDeserializer { return new PropertyDescriptionEditRequestValidatingDeserializer( new TermValidatorFactoryPropertyDescriptionValidator( WikibaseRepo::getTermValidatorFactory($services), WbRestApi::getPropertyDataRetriever($services))); }, VRD::PROPERTY_ALIASES_IN_LANGUAGE_EDIT_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):PropertyAliasesInLanguageEditRequestValidatingDeserializer { return new PropertyAliasesInLanguageEditRequestValidatingDeserializer( new TermValidatorFactoryAliasesInLanguageValidator(WikibaseRepo::getTermValidatorFactory($services)), new AliasesDeserializer(), new PrefetchingTermLookupAliasesRetriever( WikibaseRepo::getPrefetchingTermLookup($services), WikibaseRepo::getTermsLanguages($services))); }, VRD::SITELINK_EDIT_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):SitelinkEditRequestValidatingDeserializer { return new SitelinkEditRequestValidatingDeserializer( new SiteLinkConflictLookupSitelinkValidator( WbRestApi::getSitelinkDeserializer($services), new SqlSiteLinkConflictLookup( WikibaseRepo::getRepoDomainDbFactory($services) ->newRepoDb(), WikibaseRepo::getEntityIdComposer($services)),),); }, VRD::ITEM_SERIALIZATION_REQUEST_VALIDATING_DESERIALIZER=> function(MediaWikiServices $services):ItemSerializationRequestValidatingDeserializer { $termValidatorFactory=WikibaseRepo::getTermValidatorFactory($services); return new ItemSerializationRequestValidatingDeserializer( new ItemDeserializerItemValidator( WbRestApi::getItemDeserializer($services), new LanguageCodeValidator(WikibaseRepo::getTermsLanguages($services) ->getLanguages()), new TermValidatorFactoryLabelTextValidator($termValidatorFactory), WikibaseRepo::getItemTermsCollisionDetector($services))); }, 'WbRestApi.AddItemAliasesInLanguage'=> function(MediaWikiServices $services):AddItemAliasesInLanguage { return new AddItemAliasesInLanguage( WbRestApi::getItemDataRetriever($services), WbRestApi::getAssertItemExists($services), WbRestApi::getAssertUserIsAuthorized($services), WbRestApi::getItemUpdater($services), WbRestApi::getValidatingRequestDeserializer($services));}, 'WbRestApi.AddItemStatement'=> function(MediaWikiServices $services):AddItemStatement { return new AddItemStatement( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertItemExists($services), WbRestApi::getItemDataRetriever($services), WbRestApi::getItemUpdater($services), new GuidGenerator(), WbRestApi::getAssertUserIsAuthorized($services));}, 'WbRestApi.AddPropertyAliasesInLanguage'=> function(MediaWikiServices $services):AddPropertyAliasesInLanguage { return new AddPropertyAliasesInLanguage( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertPropertyExists($services), WbRestApi::getAssertUserIsAuthorized($services), WbRestApi::getPropertyDataRetriever($services), WbRestApi::getPropertyUpdater($services),);}, 'WbRestApi.AddPropertyStatement'=> function(MediaWikiServices $services):AddPropertyStatement { $statementReadModelConverter=new StatementReadModelConverter( WikibaseRepo::getStatementGuidParser($services), WikibaseRepo::getPropertyDataTypeLookup($services)); return new AddPropertyStatement( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertPropertyExists($services), new EntityRevisionLookupPropertyDataRetriever( WikibaseRepo::getEntityRevisionLookup($services), $statementReadModelConverter), new GuidGenerator(), WbRestApi::getPropertyUpdater($services), new AssertUserIsAuthorized( new WikibaseEntityPermissionChecker( WikibaseRepo::getEntityPermissionChecker($services), $services->getUserFactory())));}, 'WbRestApi.AssertItemExists'=> function(MediaWikiServices $services):AssertItemExists { return new AssertItemExists(WbRestApi::getGetLatestItemRevisionMetadata($services));}, 'WbRestApi.AssertPropertyExists'=> function(MediaWikiServices $services):AssertPropertyExists { return new AssertPropertyExists(WbRestApi::getGetLatestPropertyRevisionMetadata($services));}, 'WbRestApi.AssertStatementSubjectExists'=> function(MediaWikiServices $services):AssertStatementSubjectExists { return new AssertStatementSubjectExists(WbRestApi::getGetLatestStatementSubjectRevisionMetadata($services));}, 'WbRestApi.AssertUserIsAuthorized'=> function(MediaWikiServices $services):AssertUserIsAuthorized { return new AssertUserIsAuthorized( new WikibaseEntityPermissionChecker( WikibaseRepo::getEntityPermissionChecker($services), $services->getUserFactory()));}, 'WbRestApi.CreateItem'=> function(MediaWikiServices $services):CreateItem { return new CreateItem( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getItemUpdater($services), WbRestApi::getAssertUserIsAuthorized($services));}, 'WbRestApi.EntityUpdater'=> function(MediaWikiServices $services):EntityUpdater { return new EntityUpdater( RequestContext::getMain(), WikibaseRepo::getEditEntityFactory($services), WikibaseRepo::getLogger($services), new EditSummaryFormatter( WikibaseRepo::getSummaryFormatter($services), new TermsEditSummaryToFormattableSummaryConverter(), new FullEntityEditSummaryToFormattableSummaryConverter()), $services->getPermissionManager(), WikibaseRepo::getEntityStore($services), new GuidGenerator());}, 'WbRestApi.ErrorReporter'=> function(MediaWikiServices $services):ErrorReporter { return new MWErrorReporter();}, 'WbRestApi.GetItem'=> function(MediaWikiServices $services):GetItem { return new GetItem( WbRestApi::getGetLatestItemRevisionMetadata($services), WbRestApi::getItemDataRetriever($services), WbRestApi::getValidatingRequestDeserializer($services));}, 'WbRestApi.GetItemAliases'=> function(MediaWikiServices $services):GetItemAliases { return new GetItemAliases( WbRestApi::getGetLatestItemRevisionMetadata($services), new PrefetchingTermLookupAliasesRetriever( WikibaseRepo::getPrefetchingTermLookup($services), WikibaseRepo::getTermsLanguages($services)), WbRestApi::getValidatingRequestDeserializer($services));}, 'WbRestApi.GetItemAliasesInLanguage'=> function(MediaWikiServices $services):GetItemAliasesInLanguage { return new GetItemAliasesInLanguage( WbRestApi::getGetLatestItemRevisionMetadata($services), new PrefetchingTermLookupAliasesRetriever( WikibaseRepo::getPrefetchingTermLookup($services), WikibaseRepo::getTermsLanguages($services)), WbRestApi::getValidatingRequestDeserializer($services));}, 'WbRestApi.GetItemDescription'=> function(MediaWikiServices $services):GetItemDescription { return new GetItemDescription( WbRestApi::getGetLatestItemRevisionMetadata($services), WbRestApi::getTermLookupEntityTermsRetriever($services), WbRestApi::getValidatingRequestDeserializer($services));}, 'WbRestApi.GetItemDescriptions'=> function(MediaWikiServices $services):GetItemDescriptions { return new GetItemDescriptions( WbRestApi::getGetLatestItemRevisionMetadata($services), WbRestApi::getTermLookupEntityTermsRetriever($services), WbRestApi::getValidatingRequestDeserializer($services));}, 'WbRestApi.GetItemLabel'=> function(MediaWikiServices $services):GetItemLabel { return new GetItemLabel( WbRestApi::getGetLatestItemRevisionMetadata($services), WbRestApi::getTermLookupEntityTermsRetriever($services), WbRestApi::getValidatingRequestDeserializer($services));}, 'WbRestApi.GetItemLabels'=> function(MediaWikiServices $services):GetItemLabels { return new GetItemLabels( WbRestApi::getGetLatestItemRevisionMetadata($services), WbRestApi::getTermLookupEntityTermsRetriever($services), WbRestApi::getValidatingRequestDeserializer($services));}, 'WbRestApi.GetItemStatement'=> function(MediaWikiServices $services):GetItemStatement { return new GetItemStatement( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertItemExists($services), WbRestApi::getGetStatement($services));}, 'WbRestApi.GetItemStatements'=> function(MediaWikiServices $services):GetItemStatements { return new GetItemStatements( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getItemDataRetriever($services), WbRestApi::getGetLatestItemRevisionMetadata($services));}, 'WbRestApi.GetLatestItemRevisionMetadata'=> function(MediaWikiServices $services):GetLatestItemRevisionMetadata { return new GetLatestItemRevisionMetadata(new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever( WikibaseRepo::getEntityRevisionLookup($services)));}, 'WbRestApi.GetLatestPropertyRevisionMetadata'=> function(MediaWikiServices $services):GetLatestPropertyRevisionMetadata { return new GetLatestPropertyRevisionMetadata(new WikibaseEntityRevisionLookupPropertyRevisionMetadataRetriever( WikibaseRepo::getEntityRevisionLookup($services)));}, 'WbRestApi.GetLatestStatementSubjectRevisionMetadata'=> function( MediaWikiServices $services):GetLatestStatementSubjectRevisionMetadata { return new GetLatestStatementSubjectRevisionMetadata(new WikibaseEntityRevisionLookupStatementSubjectRevisionMetadataRetriever( WikibaseRepo::getEntityRevisionLookup($services)));}, 'WbRestApi.GetProperty'=> function(MediaWikiServices $services):GetProperty { return new GetProperty( WbRestApi::getGetLatestPropertyRevisionMetadata($services), WbRestApi::getPropertyDataRetriever($services), WbRestApi::getValidatingRequestDeserializer($services));}, 'WbRestApi.GetPropertyAliases'=> function(MediaWikiServices $services):GetPropertyAliases { return new GetPropertyAliases( WbRestApi::getGetLatestPropertyRevisionMetadata($services), new PrefetchingTermLookupAliasesRetriever( WikibaseRepo::getPrefetchingTermLookup($services), WikibaseRepo::getTermsLanguages($services)), WbRestApi::getValidatingRequestDeserializer($services));}, 'WbRestApi.GetPropertyAliasesInLanguage'=> function(MediaWikiServices $services):GetPropertyAliasesInLanguage { return new GetPropertyAliasesInLanguage( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getGetLatestPropertyRevisionMetadata($services), new PrefetchingTermLookupAliasesRetriever( WikibaseRepo::getPrefetchingTermLookup($services), WikibaseRepo::getTermsLanguages($services)));}, 'WbRestApi.GetPropertyDescription'=> function(MediaWikiServices $services):GetPropertyDescription { return new GetPropertyDescription( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getGetLatestPropertyRevisionMetadata($services), WbRestApi::getTermLookupEntityTermsRetriever($services));}, 'WbRestApi.GetPropertyDescriptions'=> function(MediaWikiServices $services):GetPropertyDescriptions { return new GetPropertyDescriptions( WbRestApi::getGetLatestPropertyRevisionMetadata($services), WbRestApi::getTermLookupEntityTermsRetriever($services), WbRestApi::getValidatingRequestDeserializer($services));}, 'WbRestApi.GetPropertyLabel'=> function(MediaWikiServices $services):GetPropertyLabel { return new GetPropertyLabel( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getGetLatestPropertyRevisionMetadata($services), WbRestApi::getTermLookupEntityTermsRetriever($services));}, 'WbRestApi.GetPropertyLabels'=> function(MediaWikiServices $services):GetPropertyLabels { return new GetPropertyLabels( WbRestApi::getGetLatestPropertyRevisionMetadata($services), WbRestApi::getTermLookupEntityTermsRetriever($services), WbRestApi::getValidatingRequestDeserializer($services));}, 'WbRestApi.GetPropertyStatement'=> function(MediaWikiServices $services):GetPropertyStatement { return new GetPropertyStatement( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertPropertyExists($services), WbRestApi::getGetStatement($services));}, 'WbRestApi.GetPropertyStatements'=> function(MediaWikiServices $services):GetPropertyStatements { return new GetPropertyStatements( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getPropertyDataRetriever($services), WbRestApi::getGetLatestPropertyRevisionMetadata($services));}, 'WbRestApi.GetSitelink'=> function(MediaWikiServices $services):GetSitelink { return new GetSitelink( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getGetLatestItemRevisionMetadata($services), WbRestApi::getItemDataRetriever($services),);}, 'WbRestApi.GetSitelinks'=> function(MediaWikiServices $services):GetSitelinks { return new GetSitelinks( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getGetLatestItemRevisionMetadata($services), WbRestApi::getItemDataRetriever($services),);}, 'WbRestApi.GetStatement'=> function(MediaWikiServices $services):GetStatement { return new GetStatement( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getStatementRetriever($services), WbRestApi::getGetLatestStatementSubjectRevisionMetadata($services));}, 'WbRestApi.ItemDataRetriever'=> function(MediaWikiServices $services):EntityRevisionLookupItemDataRetriever { return new EntityRevisionLookupItemDataRetriever( WikibaseRepo::getEntityRevisionLookup($services), new StatementReadModelConverter( WikibaseRepo::getStatementGuidParser($services), WikibaseRepo::getPropertyDataTypeLookup($services)), new SitelinksReadModelConverter($services->getSiteLookup()));}, 'WbRestApi.ItemDeserializer'=> function(MediaWikiServices $services) { return new ItemDeserializer( new LabelsDeserializer(), new DescriptionsDeserializer(), new AliasesDeserializer(), new SitelinksDeserializer(WbRestApi::getSitelinkDeserializer($services)), new StatementsDeserializer(WbRestApi::getStatementDeserializer($services)));}, 'WbRestApi.ItemUpdater'=> function(MediaWikiServices $services):EntityUpdaterItemUpdater { return new EntityUpdaterItemUpdater( WbRestApi::getEntityUpdater($services), new SitelinksReadModelConverter($services->getSiteLookup()), new StatementReadModelConverter( WikibaseRepo::getStatementGuidParser($services), WikibaseRepo::getPropertyDataTypeLookup($services)));}, 'WbRestApi.PatchItemAliases'=> function(MediaWikiServices $services):PatchItemAliases { return new PatchItemAliases( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertItemExists($services), WbRestApi::getAssertUserIsAuthorized($services), new PrefetchingTermLookupAliasesRetriever( WikibaseRepo::getPrefetchingTermLookup($services), WikibaseRepo::getTermsLanguages($services)), new AliasesSerializer(), new PatchJson(new JsonDiffJsonPatcher()), new PatchedItemAliasesValidator( new AliasesDeserializer(), new TermValidatorFactoryAliasesInLanguageValidator(WikibaseRepo::getTermValidatorFactory($services)), new LanguageCodeValidator(WikibaseRepo::getTermsLanguages($services) ->getLanguages())), WbRestApi::getItemDataRetriever($services), WbRestApi::getItemUpdater($services));}, 'WbRestApi.PatchItemDescriptions'=> function(MediaWikiServices $services):PatchItemDescriptions { return new PatchItemDescriptions( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertItemExists($services), WbRestApi::getAssertUserIsAuthorized($services), WbRestApi::getTermLookupEntityTermsRetriever($services), new DescriptionsSerializer(), new PatchJson(new JsonDiffJsonPatcher()), WbRestApi::getItemDataRetriever($services), new PatchedDescriptionsValidator( new DescriptionsDeserializer(), new TermValidatorFactoryItemDescriptionValidator( WikibaseRepo::getTermValidatorFactory($services), WikibaseRepo::getItemTermsCollisionDetector($services), WbRestApi::getItemDataRetriever($services)), new LanguageCodeValidator(WikibaseRepo::getTermsLanguages($services) ->getLanguages())), WbRestApi::getItemUpdater($services));}, 'WbRestApi.PatchItemLabels'=> function(MediaWikiServices $services):PatchItemLabels { return new PatchItemLabels( WbRestApi::getAssertItemExists($services), WbRestApi::getTermLookupEntityTermsRetriever($services), new LabelsSerializer(), new PatchJson(new JsonDiffJsonPatcher()), new PatchedItemLabelsValidator( new LabelsDeserializer(), new LabelTextValidatorItemLabelValidator( new TermValidatorFactoryLabelTextValidator(WikibaseRepo::getTermValidatorFactory($services)), WikibaseRepo::getItemTermsCollisionDetector($services), WbRestApi::getItemDataRetriever($services)), new LanguageCodeValidator(WikibaseRepo::getTermsLanguages($services) ->getLanguages())), WbRestApi::getItemDataRetriever($services), WbRestApi::getItemUpdater($services), WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertUserIsAuthorized($services));}, 'WbRestApi.PatchItemStatement'=> function(MediaWikiServices $services):PatchItemStatement { return new PatchItemStatement( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertItemExists($services), WbRestApi::getPatchStatement($services));}, 'WbRestApi.PatchPropertyAliases'=> function(MediaWikiServices $services):PatchPropertyAliases { $termLanguages=WikibaseRepo::getTermsLanguages($services); return new PatchPropertyAliases( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertPropertyExists($services), WbRestApi::getAssertUserIsAuthorized($services), new PrefetchingTermLookupAliasesRetriever( WikibaseRepo::getPrefetchingTermLookup($services), $termLanguages), new AliasesSerializer(), new PatchJson(new JsonDiffJsonPatcher()), new PatchedPropertyAliasesValidator( new AliasesDeserializer(), new TermValidatorFactoryAliasesInLanguageValidator(WikibaseRepo::getTermValidatorFactory($services)), new LanguageCodeValidator($termLanguages->getLanguages())), WbRestApi::getPropertyDataRetriever($services), WbRestApi::getPropertyUpdater($services));}, 'WbRestApi.PatchPropertyDescriptions'=> function(MediaWikiServices $services):PatchPropertyDescriptions { return new PatchPropertyDescriptions( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertPropertyExists($services), WbRestApi::getAssertUserIsAuthorized($services), new TermLookupEntityTermsRetriever( WikibaseRepo::getTermLookup($services), WikibaseRepo::getTermsLanguages($services)), new DescriptionsSerializer(), new PatchJson(new JsonDiffJsonPatcher()), WbRestApi::getPropertyDataRetriever($services), new PatchedPropertyDescriptionsValidator( new DescriptionsDeserializer(), new TermValidatorFactoryPropertyDescriptionValidator( WikibaseRepo::getTermValidatorFactory($services), WbRestApi::getPropertyDataRetriever($services)), new LanguageCodeValidator(WikibaseRepo::getTermsLanguages($services) ->getLanguages())), WbRestApi::getPropertyUpdater($services));}, 'WbRestApi.PatchPropertyLabels'=> function(MediaWikiServices $services):PatchPropertyLabels { return new PatchPropertyLabels( new TermLookupEntityTermsRetriever( WikibaseRepo::getTermLookup($services), WikibaseRepo::getTermsLanguages($services)), new LabelsSerializer(), new PatchJson(new JsonDiffJsonPatcher()), WbRestApi::getPropertyDataRetriever($services), WbRestApi::getPropertyUpdater($services), WbRestApi::getValidatingRequestDeserializer($services), new PatchedPropertyLabelsValidator( new LabelsDeserializer(), new TermValidatorFactoryPropertyLabelValidator( WikibaseRepo::getTermValidatorFactory($services), WikibaseRepo::getPropertyTermsCollisionDetector($services), WbRestApi::getPropertyDataRetriever($services)), new LanguageCodeValidator(WikibaseRepo::getTermsLanguages($services) ->getLanguages())), WbRestApi::getAssertPropertyExists($services), WbRestApi::getAssertUserIsAuthorized($services));}, 'WbRestApi.PatchPropertyStatement'=> function(MediaWikiServices $services):PatchPropertyStatement { return new PatchPropertyStatement( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertPropertyExists($services), WbRestApi::getPatchStatement($services));}, 'WbRestApi.PatchSitelinks'=> function(MediaWikiServices $services):PatchSitelinks { return new PatchSitelinks( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertItemExists($services), WbRestApi::getAssertUserIsAuthorized($services), WbRestApi::getItemDataRetriever($services), new SitelinksSerializer(new SitelinkSerializer()), new PatchJson(new JsonDiffJsonPatcher()), WbRestApi::getItemDataRetriever($services), new PatchedSitelinksValidator( new SiteIdValidator(WikibaseRepo::getSiteLinkGlobalIdentifiersProvider($services) ->getList( WikibaseRepo::getSettings($services) ->getSetting('siteLinkGroups'))), new SiteLinkConflictLookupSitelinkValidator( WbRestApi::getSitelinkDeserializer($services), new SqlSiteLinkConflictLookup( WikibaseRepo::getRepoDomainDbFactory($services) ->newRepoDb(), WikibaseRepo::getEntityIdComposer($services)),),), WbRestApi::getItemUpdater($services));}, 'WbRestApi.PatchStatement'=> function(MediaWikiServices $services):PatchStatement { return new PatchStatement( WbRestApi::getValidatingRequestDeserializer($services), new PatchedStatementValidator(new StatementValidator(WbRestApi::getStatementDeserializer($services))), new PatchJson(new JsonDiffJsonPatcher()), WbRestApi::getStatementSerializer($services), WbRestApi::getAssertStatementSubjectExists($services), WbRestApi::getStatementRetriever($services), WbRestApi::getStatementUpdater($services), WbRestApi::getAssertUserIsAuthorized($services));}, 'WbRestApi.PreconditionMiddlewareFactory'=> function(MediaWikiServices $services):PreconditionMiddlewareFactory { return new PreconditionMiddlewareFactory( WikibaseRepo::getEntityRevisionLookup($services), WikibaseRepo::getEntityIdParser($services), new ConditionalHeaderUtil());}, 'WbRestApi.PropertyDataRetriever'=> function(MediaWikiServices $services):EntityRevisionLookupPropertyDataRetriever { return new EntityRevisionLookupPropertyDataRetriever( WikibaseRepo::getEntityRevisionLookup($services), new StatementReadModelConverter( WikibaseRepo::getStatementGuidParser($services), WikibaseRepo::getPropertyDataTypeLookup($services)),);}, 'WbRestApi.PropertyUpdater'=> function(MediaWikiServices $services):PropertyUpdater { return new EntityUpdaterPropertyUpdater( WbRestApi::getEntityUpdater($services), new StatementReadModelConverter( WikibaseRepo::getStatementGuidParser($services), WikibaseRepo::getPropertyDataTypeLookup($services)));}, 'WbRestApi.RemoveItemDescription'=> function(MediaWikiServices $services):RemoveItemDescription { return new RemoveItemDescription( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertItemExists($services), WbRestApi::getAssertUserIsAuthorized($services), WbRestApi::getItemDataRetriever($services), WbRestApi::getItemUpdater($services));}, 'WbRestApi.RemoveItemLabel'=> function(MediaWikiServices $services):RemoveItemLabel { return new RemoveItemLabel( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertItemExists($services), WbRestApi::getAssertUserIsAuthorized($services), WbRestApi::getItemDataRetriever($services), WbRestApi::getItemUpdater($services));}, 'WbRestApi.RemoveItemStatement'=> function(MediaWikiServices $services):RemoveItemStatement { return new RemoveItemStatement( WbRestApi::getAssertItemExists($services), WbRestApi::getRemoveStatement($services), WbRestApi::getValidatingRequestDeserializer($services));}, 'WbRestApi.RemovePropertyDescription'=> function(MediaWikiServices $services):RemovePropertyDescription { return new RemovePropertyDescription( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertPropertyExists($services), WbRestApi::getAssertUserIsAuthorized($services), WbRestApi::getPropertyDataRetriever($services), WbRestApi::getPropertyUpdater($services));}, 'WbRestApi.RemovePropertyLabel'=> function(MediaWikiServices $services):RemovePropertyLabel { return new RemovePropertyLabel( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertPropertyExists($services), WbRestApi::getAssertUserIsAuthorized($services), WbRestApi::getPropertyDataRetriever($services), WbRestApi::getPropertyUpdater($services));}, 'WbRestApi.RemovePropertyStatement'=> function(MediaWikiServices $services):RemovePropertyStatement { return new RemovePropertyStatement( WbRestApi::getAssertPropertyExists($services), WbRestApi::getRemoveStatement($services), WbRestApi::getValidatingRequestDeserializer($services));}, 'WbRestApi.RemoveSitelink'=> function(MediaWikiServices $services):RemoveSitelink { return new RemoveSitelink( WbRestApi::getItemDataRetriever($services), WbRestApi::getItemUpdater($services), WbRestApi::getAssertItemExists($services), WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertUserIsAuthorized($services));}, 'WbRestApi.RemoveStatement'=> function(MediaWikiServices $services):RemoveStatement { return new RemoveStatement( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertUserIsAuthorized($services), WbRestApi::getAssertStatementSubjectExists($services), WbRestApi::getStatementRetriever($services), WbRestApi::getStatementRemover($services));}, 'WbRestApi.ReplaceItemStatement'=> function(MediaWikiServices $services):ReplaceItemStatement { return new ReplaceItemStatement( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertItemExists($services), WbRestApi::getReplaceStatement($services));}, 'WbRestApi.ReplacePropertyStatement'=> function(MediaWikiServices $services):ReplacePropertyStatement { return new ReplacePropertyStatement( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertPropertyExists($services), WbRestApi::getReplaceStatement($services));}, 'WbRestApi.ReplaceStatement'=> function(MediaWikiServices $services):ReplaceStatement { return new ReplaceStatement( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertStatementSubjectExists($services), WbRestApi::getAssertUserIsAuthorized($services), WbRestApi::getStatementUpdater($services));}, 'WbRestApi.SetItemDescription'=> function(MediaWikiServices $services):SetItemDescription { return new SetItemDescription( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertItemExists($services), WbRestApi::getItemDataRetriever($services), WbRestApi::getItemUpdater($services), WbRestApi::getAssertUserIsAuthorized($services));}, 'WbRestApi.SetItemLabel'=> function(MediaWikiServices $services):SetItemLabel { return new SetItemLabel( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertItemExists($services), WbRestApi::getItemDataRetriever($services), WbRestApi::getItemUpdater($services), WbRestApi::getAssertUserIsAuthorized($services));}, 'WbRestApi.SetPropertyDescription'=> function(MediaWikiServices $services):SetPropertyDescription { return new SetPropertyDescription( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getPropertyDataRetriever($services), WbRestApi::getPropertyUpdater($services), WbRestApi::getAssertPropertyExists($services), WbRestApi::getAssertUserIsAuthorized($services));}, 'WbRestApi.SetPropertyLabel'=> function(MediaWikiServices $services):SetPropertyLabel { return new SetPropertyLabel( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getPropertyDataRetriever($services), WbRestApi::getPropertyUpdater($services), WbRestApi::getAssertPropertyExists($services), WbRestApi::getAssertUserIsAuthorized($services));}, 'WbRestApi.SetSitelink'=> function(MediaWikiServices $services):SetSitelink { return new SetSitelink( WbRestApi::getValidatingRequestDeserializer($services), WbRestApi::getAssertItemExists($services), WbRestApi::getAssertUserIsAuthorized($services), WbRestApi::getItemDataRetriever($services), WbRestApi::getItemUpdater($services));}, 'WbRestApi.SitelinkDeserializer'=> function(MediaWikiServices $services):SitelinkDeserializer { return new SitelinkDeserializer( MediaWikiTitleCodec::getTitleInvalidRegex(), array_keys(WikibaseRepo::getSettings($services) ->getSetting('badgeItems')), new SiteLinkPageNormalizerSitelinkTargetResolver( $services->getSiteLookup(), WikibaseRepo::getSiteLinkPageNormalizer($services)), new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever(WikibaseRepo::getEntityRevisionLookup($services)));}, 'WbRestApi.StatementDeserializer'=> function(MediaWikiServices $services):StatementDeserializer { $entityIdParser=WikibaseRepo::getEntityIdParser($services); $propertyValuePairDeserializer=new PropertyValuePairDeserializer( $entityIdParser, WikibaseRepo::getPropertyDataTypeLookup($services), new DataValuesValueDeserializer( new DataTypeFactoryValueTypeLookup(WikibaseRepo::getDataTypeFactory($services)), $entityIdParser, WikibaseRepo::getDataValueDeserializer($services), WikibaseRepo::getDataTypeValidatorFactory($services))); return new StatementDeserializer( $propertyValuePairDeserializer, new ReferenceDeserializer($propertyValuePairDeserializer));}, 'WbRestApi.StatementRedirectMiddlewareFactory'=> function(MediaWikiServices $services):StatementRedirectMiddlewareFactory { return new StatementRedirectMiddlewareFactory( WikibaseRepo::getEntityIdParser($services), new StatementSubjectRetriever(WikibaseRepo::getEntityRevisionLookup($services)));}, 'WbRestApi.StatementRemover'=> function(MediaWikiServices $services):StatementRemover { return new EntityUpdaterStatementRemover( new StatementSubjectRetriever(WikibaseRepo::getEntityRevisionLookup($services)), WbRestApi::getEntityUpdater($services),);}, 'WbRestApi.StatementRetriever'=> function(MediaWikiServices $services):EntityRevisionLookupStatementRetriever { return new EntityRevisionLookupStatementRetriever( new StatementSubjectRetriever(WikibaseRepo::getEntityRevisionLookup($services)), new StatementReadModelConverter( WikibaseRepo::getStatementGuidParser($services), WikibaseRepo::getPropertyDataTypeLookup($services)));}, 'WbRestApi.StatementSerializer'=> function(MediaWikiServices $services):StatementSerializer { $propertyValuePairSerializer=new PropertyValuePairSerializer(); $referenceSerializer=new ReferenceSerializer($propertyValuePairSerializer); return new StatementSerializer($propertyValuePairSerializer, $referenceSerializer);}, 'WbRestApi.StatementUpdater'=> function(MediaWikiServices $services):StatementUpdater { return new EntityUpdaterStatementUpdater( WikibaseRepo::getStatementGuidParser($services), new StatementSubjectRetriever(WikibaseRepo::getEntityRevisionLookup($services)), WbRestApi::getEntityUpdater($services), new StatementReadModelConverter( WikibaseRepo::getStatementGuidParser($services), WikibaseRepo::getPropertyDataTypeLookup($services)));}, 'WbRestApi.TermLookupEntityTermsRetriever'=> function(MediaWikiServices $services):TermLookupEntityTermsRetriever { return new TermLookupEntityTermsRetriever( WikibaseRepo::getTermLookup($services), WikibaseRepo::getTermsLanguages($services));}, 'WbRestApi.UnexpectedErrorHandlerMiddleware'=> function(MediaWikiServices $services):UnexpectedErrorHandlerMiddleware { return new UnexpectedErrorHandlerMiddleware( new ResponseFactory(), $services->get('WbRestApi.ErrorReporter'), WikibaseRepo::getLogger($services));}, 'WbRestApi.ValidatingRequestDeserializer'=> function(MediaWikiServices $services):VRD { return new VRD($services);},] |
-require-sorted-array