Wikibase
MediaWiki Wikibase extension
|
Variables | |
return [ 'WbRestApi.AddItemStatement'=> function(MediaWikiServices $services):AddItemStatement { return new AddItemStatement(new AddItemStatementValidator(new ItemIdValidator(), new SnakValidatorStatementValidator(WikibaseRepo::getBaseDataModelDeserializerFactory() ->newStatementDeserializer(), new SnakValidator(WikibaseRepo::getPropertyDataTypeLookup( $services), WikibaseRepo::getDataTypeFactory( $services), WikibaseRepo::getDataTypeValidatorFactory( $services))), new EditMetadataValidator(CommentStore::COMMENT_CHARACTER_LIMIT, ChangeTags::listExplicitlyDefinedTags())), new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever(WikibaseRepo::getEntityRevisionLookup( $services)), new WikibaseEntityLookupItemDataRetriever(WikibaseRepo::getEntityLookup( $services)), new MediaWikiEditEntityFactoryItemUpdater(RequestContext::getMain(), WikibaseRepo::getEditEntityFactory( $services), WikibaseRepo::getLogger( $services)), new GuidGenerator(), new WikibaseEntityPermissionChecker(WikibaseRepo::getEntityPermissionChecker( $services), $services->getUserFactory()));}, 'WbRestApi.GetItem'=> function(MediaWikiServices $services):GetItem { return new GetItem(new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever(WikibaseRepo::getEntityRevisionLookup( $services)), new WikibaseEntityLookupItemDataRetriever(WikibaseRepo::getEntityLookup( $services)), new GetItemValidator(new ItemIdValidator()));}, 'WbRestApi.GetItemStatement'=> function(MediaWikiServices $services):GetItemStatement { return new GetItemStatement(new GetItemStatementValidator(new StatementIdValidator(new ItemIdParser()), new ItemIdValidator()), new WikibaseEntityLookupItemDataRetriever(WikibaseRepo::getEntityLookup( $services)), new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever(WikibaseRepo::getEntityRevisionLookup( $services)));}, 'WbRestApi.GetItemStatements'=> function(MediaWikiServices $services):GetItemStatements { return new GetItemStatements(new GetItemStatementsValidator(new ItemIdValidator()), new WikibaseEntityLookupItemDataRetriever(WikibaseRepo::getEntityLookup( $services)), new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever(WikibaseRepo::getEntityRevisionLookup( $services)));}, 'WbRestApi.PatchItemStatement'=> function(MediaWikiServices $services):PatchItemStatement { return new PatchItemStatement(new PatchItemStatementValidator(new ItemIdValidator(), new StatementIdValidator(new ItemIdParser()), new JsonDiffJsonPatchValidator(), new EditMetadataValidator(CommentStore::COMMENT_CHARACTER_LIMIT, ChangeTags::listExplicitlyDefinedTags())), new StatementGuidParser(new ItemIdParser()), new WikibaseEntityLookupItemDataRetriever(WikibaseRepo::getEntityLookup( $services)), new JsonDiffStatementPatcher(WikibaseRepo::getBaseDataModelSerializerFactory( $services) ->newStatementSerializer(), WikibaseRepo::getBaseDataModelDeserializerFactory( $services) ->newStatementDeserializer()), new MediaWikiEditEntityFactoryItemUpdater(RequestContext::getMain(), WikibaseRepo::getEditEntityFactory( $services), WikibaseRepo::getLogger( $services)));}, 'WbRestApi.PreconditionMiddlewareFactory'=> function(MediaWikiServices $services):PreconditionMiddlewareFactory { return new PreconditionMiddlewareFactory(new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever(WikibaseRepo::getEntityRevisionLookup( $services)), new ConditionalHeaderUtil());}, 'WbRestApi.RemoveItemStatement'=> function(MediaWikiServices $services):RemoveItemStatement { return new RemoveItemStatement(new RemoveItemStatementValidator(new ItemIdValidator(), new StatementIdValidator(new ItemIdParser()), new EditMetadataValidator(CommentStore::COMMENT_CHARACTER_LIMIT, ChangeTags::listExplicitlyDefinedTags())), new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever(WikibaseRepo::getEntityRevisionLookup( $services)), new StatementGuidParser(new ItemIdParser()), new WikibaseEntityLookupItemDataRetriever(WikibaseRepo::getEntityLookup( $services)), new MediaWikiEditEntityFactoryItemUpdater(RequestContext::getMain(), WikibaseRepo::getEditEntityFactory( $services), WikibaseRepo::getLogger( $services)), new WikibaseEntityPermissionChecker(WikibaseRepo::getEntityPermissionChecker( $services), $services->getUserFactory()));}, 'WbRestApi.ReplaceItemStatement'=> function(MediaWikiServices $services):ReplaceItemStatement { return new ReplaceItemStatement(new ReplaceItemStatementValidator(new ItemIdValidator(), new StatementIdValidator(new ItemIdParser()), new SnakValidatorStatementValidator(WikibaseRepo::getBaseDataModelDeserializerFactory() ->newStatementDeserializer(), new SnakValidator(WikibaseRepo::getPropertyDataTypeLookup( $services), WikibaseRepo::getDataTypeFactory( $services), WikibaseRepo::getDataTypeValidatorFactory( $services))), new EditMetadataValidator(CommentStore::COMMENT_CHARACTER_LIMIT, ChangeTags::listExplicitlyDefinedTags())), new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever(WikibaseRepo::getEntityRevisionLookup( $services)), new WikibaseEntityLookupItemDataRetriever(WikibaseRepo::getEntityLookup( $services)), new MediaWikiEditEntityFactoryItemUpdater(RequestContext::getMain(), WikibaseRepo::getEditEntityFactory( $services), WikibaseRepo::getLogger( $services)), new WikibaseEntityPermissionChecker(WikibaseRepo::getEntityPermissionChecker( $services), $services->getUserFactory()));}, 'WbRestApi.SerializerFactory'=> function(MediaWikiServices $services):SerializerFactory { $legacySerializerFactory=new LegacySerializerFactory(new DataValueSerializer(), LegacySerializerFactory::OPTION_OBJECTS_FOR_MAPS);return new SerializerFactory( $legacySerializerFactory, WikibaseRepo::getPropertyDataTypeLookup( $services));},] | |
-require-sorted-array | |
return['WbRestApi.AddItemStatement'=> function(MediaWikiServices $services):AddItemStatement { return new AddItemStatement( new AddItemStatementValidator( new ItemIdValidator(), new SnakValidatorStatementValidator( WikibaseRepo::getBaseDataModelDeserializerFactory() ->newStatementDeserializer(), new SnakValidator( WikibaseRepo::getPropertyDataTypeLookup($services), WikibaseRepo::getDataTypeFactory($services), WikibaseRepo::getDataTypeValidatorFactory($services))), new EditMetadataValidator( CommentStore::COMMENT_CHARACTER_LIMIT, ChangeTags::listExplicitlyDefinedTags())), new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever( WikibaseRepo::getEntityRevisionLookup($services)), new WikibaseEntityLookupItemDataRetriever(WikibaseRepo::getEntityLookup($services)), new MediaWikiEditEntityFactoryItemUpdater( RequestContext::getMain(), WikibaseRepo::getEditEntityFactory($services), WikibaseRepo::getLogger($services)), new GuidGenerator(), new WikibaseEntityPermissionChecker( WikibaseRepo::getEntityPermissionChecker($services), $services->getUserFactory()));}, 'WbRestApi.GetItem'=> function(MediaWikiServices $services):GetItem { return new GetItem( new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever( WikibaseRepo::getEntityRevisionLookup($services)), new WikibaseEntityLookupItemDataRetriever(WikibaseRepo::getEntityLookup($services)), new GetItemValidator(new ItemIdValidator()));}, 'WbRestApi.GetItemStatement'=> function(MediaWikiServices $services):GetItemStatement { return new GetItemStatement( new GetItemStatementValidator( new StatementIdValidator(new ItemIdParser()), new ItemIdValidator()), new WikibaseEntityLookupItemDataRetriever( WikibaseRepo::getEntityLookup($services)), new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever( WikibaseRepo::getEntityRevisionLookup($services)));}, 'WbRestApi.GetItemStatements'=> function(MediaWikiServices $services):GetItemStatements { return new GetItemStatements( new GetItemStatementsValidator(new ItemIdValidator()), new WikibaseEntityLookupItemDataRetriever(WikibaseRepo::getEntityLookup($services)), new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever( WikibaseRepo::getEntityRevisionLookup($services)));}, 'WbRestApi.PatchItemStatement'=> function(MediaWikiServices $services):PatchItemStatement { return new PatchItemStatement( new PatchItemStatementValidator( new ItemIdValidator(), new StatementIdValidator(new ItemIdParser()), new JsonDiffJsonPatchValidator(), new EditMetadataValidator( CommentStore::COMMENT_CHARACTER_LIMIT, ChangeTags::listExplicitlyDefinedTags())), new StatementGuidParser(new ItemIdParser()), new WikibaseEntityLookupItemDataRetriever(WikibaseRepo::getEntityLookup($services)), new JsonDiffStatementPatcher( WikibaseRepo::getBaseDataModelSerializerFactory($services) ->newStatementSerializer(), WikibaseRepo::getBaseDataModelDeserializerFactory($services) ->newStatementDeserializer()), new MediaWikiEditEntityFactoryItemUpdater( RequestContext::getMain(), WikibaseRepo::getEditEntityFactory($services), WikibaseRepo::getLogger($services)));}, 'WbRestApi.PreconditionMiddlewareFactory'=> function(MediaWikiServices $services):PreconditionMiddlewareFactory { return new PreconditionMiddlewareFactory( new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever( WikibaseRepo::getEntityRevisionLookup($services)), new ConditionalHeaderUtil());}, 'WbRestApi.RemoveItemStatement'=> function(MediaWikiServices $services):RemoveItemStatement { return new RemoveItemStatement( new RemoveItemStatementValidator( new ItemIdValidator(), new StatementIdValidator(new ItemIdParser()), new EditMetadataValidator( CommentStore::COMMENT_CHARACTER_LIMIT, ChangeTags::listExplicitlyDefinedTags())), new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever( WikibaseRepo::getEntityRevisionLookup($services)), new StatementGuidParser(new ItemIdParser()), new WikibaseEntityLookupItemDataRetriever(WikibaseRepo::getEntityLookup($services)), new MediaWikiEditEntityFactoryItemUpdater( RequestContext::getMain(), WikibaseRepo::getEditEntityFactory($services), WikibaseRepo::getLogger($services)), new WikibaseEntityPermissionChecker( WikibaseRepo::getEntityPermissionChecker($services), $services->getUserFactory()));}, 'WbRestApi.ReplaceItemStatement'=> function(MediaWikiServices $services):ReplaceItemStatement { return new ReplaceItemStatement( new ReplaceItemStatementValidator( new ItemIdValidator(), new StatementIdValidator(new ItemIdParser()), new SnakValidatorStatementValidator( WikibaseRepo::getBaseDataModelDeserializerFactory() ->newStatementDeserializer(), new SnakValidator( WikibaseRepo::getPropertyDataTypeLookup($services), WikibaseRepo::getDataTypeFactory($services), WikibaseRepo::getDataTypeValidatorFactory($services))), new EditMetadataValidator( CommentStore::COMMENT_CHARACTER_LIMIT, ChangeTags::listExplicitlyDefinedTags())), new WikibaseEntityRevisionLookupItemRevisionMetadataRetriever( WikibaseRepo::getEntityRevisionLookup($services)), new WikibaseEntityLookupItemDataRetriever(WikibaseRepo::getEntityLookup($services)), new MediaWikiEditEntityFactoryItemUpdater( RequestContext::getMain(), WikibaseRepo::getEditEntityFactory($services), WikibaseRepo::getLogger($services)), new WikibaseEntityPermissionChecker( WikibaseRepo::getEntityPermissionChecker($services), $services->getUserFactory()));}, 'WbRestApi.SerializerFactory'=> function(MediaWikiServices $services):SerializerFactory { $legacySerializerFactory=new LegacySerializerFactory( new DataValueSerializer(), LegacySerializerFactory::OPTION_OBJECTS_FOR_MAPS); return new SerializerFactory($legacySerializerFactory, WikibaseRepo::getPropertyDataTypeLookup($services));},] |
-require-sorted-array