Wikibase
MediaWiki Wikibase extension
|
Accessor that can dispatch to internal Accessors based on the entity type of IDs provided. More...
Public Member Functions | |
__construct (array $instansiators, WikiPageEntityMetaDataAccessor $defaultAccessor, $databaseName, $repositoryName) | |
loadRevisionInformation (array $entityIds, $mode) | |
loadRevisionInformationByRevisionId (EntityId $entityId, $revisionId, $mode=LookupConstants::LATEST_FROM_MASTER) | |
loadLatestRevisionIds (array $entityIds, $mode) | |
Private Member Functions | |
groupIdsByType (array $entityIds) | |
getAccessor ( $entityType) | |
Private Attributes | |
$accessors | |
$defaultAccessor | |
$databaseName | |
$repositoryName | |
Accessor that can dispatch to internal Accessors based on the entity type of IDs provided.
As the accessor includes batched access this class will batch entity IDs by type before using the internal accessors. This is needed as the EntityMetaDataAccessor implements queries against the page table base on entity IDs that won't work for all entities.
Wikibase\Lib\Store\Sql\TypeDispatchingWikiPageEntityMetaDataAccessor::__construct | ( | array | $instansiators, |
WikiPageEntityMetaDataAccessor | $defaultAccessor, | ||
$databaseName, | |||
$repositoryName ) |
callable[] | WikiPageEntityMetaDataAccessor[] | $instansiators | An associative array mapping entity types to instansiator callbacks. Callback signature: function( $databaseName, $repositoryName ): WikiPageEntityMetaDataAccessor Parameter Types: string|false $databaseName, string $repositoryName |
WikiPageEntityMetaDataAccessor | $defaultAccessor | |
string | false | $databaseName | |
string | $repositoryName |
|
private |
string | $entityType |
InvalidArgumentException |
|
private |
EntityId[] | $entityIds |
Wikibase\Lib\Store\Sql\TypeDispatchingWikiPageEntityMetaDataAccessor::loadLatestRevisionIds | ( | array | $entityIds, |
$mode ) |
EntityId[] | $entityIds | |
string | $mode | ( LookupConstants::LATEST_FROM_REPLICA, LookupConstants::LATEST_FROM_REPLICA_WITH_FALLBACK or LookupConstants::LATEST_FROM_MASTER) |
Implements Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataAccessor.
Wikibase\Lib\Store\Sql\TypeDispatchingWikiPageEntityMetaDataAccessor::loadRevisionInformation | ( | array | $entityIds, |
$mode ) |
EntityId[] | $entityIds | |
string | $mode | ( LookupConstants::LATEST_FROM_REPLICA, LookupConstants::LATEST_FROM_REPLICA_WITH_FALLBACK or LookupConstants::LATEST_FROM_MASTER) |
Implements Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataAccessor.
Wikibase\Lib\Store\Sql\TypeDispatchingWikiPageEntityMetaDataAccessor::loadRevisionInformationByRevisionId | ( | EntityId | $entityId, |
$revisionId, | |||
$mode = LookupConstants::LATEST_FROM_MASTER ) |
EntityId | $entityId | |
int | $revisionId | Revision id to fetch data about, must be an integer greater than 0. |
string | $mode | ( LookupConstants::LATEST_FROM_REPLICA, LookupConstants::LATEST_FROM_REPLICA_WITH_FALLBACK or LookupConstants::LATEST_FROM_MASTER). |
Implements Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataAccessor.
|
private |
|
private |
|
private |
|
private |