Wikibase
MediaWiki Wikibase extension
Wikibase\Lib\EntityTypeDefinitions Class Reference

Service that manages entity type definition. More...

Public Member Functions

 __construct (array $entityTypeDefinitions)
 
 getEntityTypes ()
 
 get (string $field)
 
 getEntityIdBuilders ()
 

Public Attributes

const ENTITY_STORE_FACTORY_CALLBACK = 'entity-store-factory-callback'
 
const ENTITY_REVISION_LOOKUP_FACTORY_CALLBACK = 'entity-revision-lookup-factory-callback'
 
const ENTITY_TITLE_STORE_LOOKUP_FACTORY_CALLBACK = 'entity-title-store-lookup-factory-callback'
 
const ENTITY_METADATA_ACCESSOR_CALLBACK = 'entity-metadata-accessor-callback'
 
const PREFETCHING_TERM_LOOKUP_CALLBACK = 'prefetching-term-lookup-callback'
 
const SERIALIZER_FACTORY_CALLBACK = 'serializer-factory-callback'
 
const STORAGE_SERIALIZER_FACTORY_CALLBACK = 'storage-serializer-factory-callback'
 
const DESERIALIZER_FACTORY_CALLBACK = 'deserializer-factory-callback'
 
const VIEW_FACTORY_CALLBACK = 'view-factory-callback'
 
const META_TAGS_CREATOR_CALLBACK = 'meta-tags-creator-callback'
 
const CONTENT_MODEL_ID = 'content-model-id'
 
const CONTENT_HANDLER_FACTORY_CALLBACK = 'content-handler-factory-callback'
 
const ENTITY_FACTORY_CALLBACK = 'entity-factory-callback'
 
const ENTITY_DIFFER_STRATEGY_BUILDER = 'entity-differ-strategy-builder'
 
const ENTITY_PATCHER_STRATEGY_BUILDER = 'entity-patcher-strategy-builder'
 
const ENTITY_DIFF_VISUALIZER_CALLBACK = 'entity-diff-visualizer-callback'
 
const JS_DESERIALIZER_FACTORY_FUNCTION = 'js-deserializer-factory-function'
 
const ENTITY_ID_COMPOSER_CALLBACK = 'entity-id-composer-callback'
 
const CHANGEOP_DESERIALIZER_CALLBACK = 'changeop-deserializer-callback'
 
const RDF_BUILDER_FACTORY_CALLBACK = 'rdf-builder-factory-callback'
 
const RDF_BUILDER_STUB_FACTORY_CALLBACK = 'rdf-builder-stub-factory-callback'
 
const ENTITY_SEARCH_CALLBACK = 'entity-search-callback'
 
const SUB_ENTITY_TYPES = 'sub-entity-types'
 
const LINK_FORMATTER_CALLBACK = 'link-formatter-callback'
 
const ENTITY_ID_HTML_LINK_FORMATTER_CALLBACK = 'entity-id-html-link-formatter-callback'
 
const ENTITY_REFERENCE_EXTRACTOR_CALLBACK = 'entity-reference-extractor-callback'
 
const FULLTEXT_SEARCH_CONTEXT = 'fulltext-search-context'
 
const SEARCH_FIELD_DEFINITIONS = 'search-field-definitions'
 
const RDF_LABEL_PREDICATES = 'rdf-builder-label-predicates'
 
const LUA_ENTITY_MODULE = 'lua-entity-module'
 
const ENTITY_ID_LOOKUP_CALLBACK = 'entity-id-lookup-callback'
 
const ARTICLE_ID_LOOKUP_CALLBACK = 'article-id-lookup-callback'
 
const TITLE_TEXT_LOOKUP_CALLBACK = 'title-text-lookup-callback'
 
const URL_LOOKUP_CALLBACK = 'url-lookup-callback'
 
const EXISTENCE_CHECKER_CALLBACK = 'existence-checker-callback'
 
const REDIRECT_CHECKER_CALLBACK = 'redirect-checker-callback'
 
const ENTITY_ID_PATTERN = 'entity-id-pattern'
 
const ENTITY_ID_BUILDER = 'entity-id-builder'
 

Private Attributes

 $entityTypeDefinitions
 

Detailed Description

Service that manages entity type definition.

This is a registry that provides access to factory functions for various services associated with entity types, such as serializers.

EntityTypeDefinitions provides a one-stop interface for defining entity types. Each entity type is defined using a "entity type definition" array.

See also
Entitytypes for the fields of a definition array
Author
Bene* < benes.nosp@m.tar..nosp@m.wikim.nosp@m.edia.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
Adrian Heine adria.nosp@m.n.he.nosp@m.ine@w.nosp@m.ikim.nosp@m.edia..nosp@m.de
Thiemo Kreuz

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\EntityTypeDefinitions::__construct ( array  $entityTypeDefinitions)
Parameters
array[]$entityTypeDefinitionsMap from entity types to entity definitions See class level documentation for details
Exceptions
InvalidArgumentException

Member Function Documentation

◆ get()

Wikibase\Lib\EntityTypeDefinitions::get ( string  $field)
Parameters
string$fieldone of the constants declared in this class
Returns
array map of entity types to the values specified for the given field. Not guaranteed to contain all entity types.

◆ getEntityIdBuilders()

Wikibase\Lib\EntityTypeDefinitions::getEntityIdBuilders ( )
Returns
callable[]

◆ getEntityTypes()

Wikibase\Lib\EntityTypeDefinitions::getEntityTypes ( )
Returns
string[] a list of all defined entity types

Member Data Documentation

◆ $entityTypeDefinitions

Wikibase\Lib\EntityTypeDefinitions::$entityTypeDefinitions
private

◆ ARTICLE_ID_LOOKUP_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::ARTICLE_ID_LOOKUP_CALLBACK = 'article-id-lookup-callback'

◆ CHANGEOP_DESERIALIZER_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::CHANGEOP_DESERIALIZER_CALLBACK = 'changeop-deserializer-callback'

◆ CONTENT_HANDLER_FACTORY_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::CONTENT_HANDLER_FACTORY_CALLBACK = 'content-handler-factory-callback'

◆ CONTENT_MODEL_ID

const Wikibase\Lib\EntityTypeDefinitions::CONTENT_MODEL_ID = 'content-model-id'

◆ DESERIALIZER_FACTORY_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::DESERIALIZER_FACTORY_CALLBACK = 'deserializer-factory-callback'

◆ ENTITY_DIFF_VISUALIZER_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_DIFF_VISUALIZER_CALLBACK = 'entity-diff-visualizer-callback'

◆ ENTITY_DIFFER_STRATEGY_BUILDER

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_DIFFER_STRATEGY_BUILDER = 'entity-differ-strategy-builder'

◆ ENTITY_FACTORY_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_FACTORY_CALLBACK = 'entity-factory-callback'

◆ ENTITY_ID_BUILDER

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_ID_BUILDER = 'entity-id-builder'

◆ ENTITY_ID_COMPOSER_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_ID_COMPOSER_CALLBACK = 'entity-id-composer-callback'

◆ ENTITY_ID_HTML_LINK_FORMATTER_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_ID_HTML_LINK_FORMATTER_CALLBACK = 'entity-id-html-link-formatter-callback'

◆ ENTITY_ID_LOOKUP_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_ID_LOOKUP_CALLBACK = 'entity-id-lookup-callback'

◆ ENTITY_ID_PATTERN

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_ID_PATTERN = 'entity-id-pattern'

◆ ENTITY_METADATA_ACCESSOR_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_METADATA_ACCESSOR_CALLBACK = 'entity-metadata-accessor-callback'

◆ ENTITY_PATCHER_STRATEGY_BUILDER

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_PATCHER_STRATEGY_BUILDER = 'entity-patcher-strategy-builder'

◆ ENTITY_REFERENCE_EXTRACTOR_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_REFERENCE_EXTRACTOR_CALLBACK = 'entity-reference-extractor-callback'

◆ ENTITY_REVISION_LOOKUP_FACTORY_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_REVISION_LOOKUP_FACTORY_CALLBACK = 'entity-revision-lookup-factory-callback'

◆ ENTITY_SEARCH_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_SEARCH_CALLBACK = 'entity-search-callback'

◆ ENTITY_STORE_FACTORY_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_STORE_FACTORY_CALLBACK = 'entity-store-factory-callback'

◆ ENTITY_TITLE_STORE_LOOKUP_FACTORY_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::ENTITY_TITLE_STORE_LOOKUP_FACTORY_CALLBACK = 'entity-title-store-lookup-factory-callback'

◆ EXISTENCE_CHECKER_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::EXISTENCE_CHECKER_CALLBACK = 'existence-checker-callback'

◆ FULLTEXT_SEARCH_CONTEXT

const Wikibase\Lib\EntityTypeDefinitions::FULLTEXT_SEARCH_CONTEXT = 'fulltext-search-context'

◆ JS_DESERIALIZER_FACTORY_FUNCTION

const Wikibase\Lib\EntityTypeDefinitions::JS_DESERIALIZER_FACTORY_FUNCTION = 'js-deserializer-factory-function'

◆ LINK_FORMATTER_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::LINK_FORMATTER_CALLBACK = 'link-formatter-callback'

◆ LUA_ENTITY_MODULE

const Wikibase\Lib\EntityTypeDefinitions::LUA_ENTITY_MODULE = 'lua-entity-module'

◆ META_TAGS_CREATOR_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::META_TAGS_CREATOR_CALLBACK = 'meta-tags-creator-callback'

◆ PREFETCHING_TERM_LOOKUP_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::PREFETCHING_TERM_LOOKUP_CALLBACK = 'prefetching-term-lookup-callback'

◆ RDF_BUILDER_FACTORY_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::RDF_BUILDER_FACTORY_CALLBACK = 'rdf-builder-factory-callback'

◆ RDF_BUILDER_STUB_FACTORY_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::RDF_BUILDER_STUB_FACTORY_CALLBACK = 'rdf-builder-stub-factory-callback'

◆ RDF_LABEL_PREDICATES

const Wikibase\Lib\EntityTypeDefinitions::RDF_LABEL_PREDICATES = 'rdf-builder-label-predicates'

◆ REDIRECT_CHECKER_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::REDIRECT_CHECKER_CALLBACK = 'redirect-checker-callback'

◆ SEARCH_FIELD_DEFINITIONS

const Wikibase\Lib\EntityTypeDefinitions::SEARCH_FIELD_DEFINITIONS = 'search-field-definitions'

◆ SERIALIZER_FACTORY_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::SERIALIZER_FACTORY_CALLBACK = 'serializer-factory-callback'

◆ STORAGE_SERIALIZER_FACTORY_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::STORAGE_SERIALIZER_FACTORY_CALLBACK = 'storage-serializer-factory-callback'

◆ SUB_ENTITY_TYPES

const Wikibase\Lib\EntityTypeDefinitions::SUB_ENTITY_TYPES = 'sub-entity-types'

◆ TITLE_TEXT_LOOKUP_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::TITLE_TEXT_LOOKUP_CALLBACK = 'title-text-lookup-callback'

◆ URL_LOOKUP_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::URL_LOOKUP_CALLBACK = 'url-lookup-callback'

◆ VIEW_FACTORY_CALLBACK

const Wikibase\Lib\EntityTypeDefinitions::VIEW_FACTORY_CALLBACK = 'view-factory-callback'

The documentation for this class was generated from the following file: