Wikibase
MediaWiki Wikibase extension
|
An EntityStore that does dispatching based on the entity type. More...
Public Member Functions | |
__construct (array $callbacks, EntityStore $defaultStore, EntityRevisionLookup $lookup) | |
assignFreshId (EntityDocument $entity) | |
saveEntity (EntityDocument $entity, $summary, User $user, $flags=0, $baseRevId=false, array $tags=[]) | |
saveRedirect (EntityRedirect $redirect, $summary, User $user, $flags=0, $baseRevId=false, array $tags=[]) | |
deleteEntity (EntityId $entityId, $reason, User $user) | |
userWasLastToEdit (User $user, EntityId $id, $lastRevId) | |
updateWatchlist (User $user, EntityId $id, $watch) | |
isWatching (User $user, EntityId $id) | |
canCreateWithCustomId (EntityId $id) | |
getWikiPageForEntity (EntityId $entityId) | |
Private Member Functions | |
getStore ( $entityType) | |
Private Attributes | |
$stores | |
$defaultStore | |
$lookup | |
An EntityStore that does dispatching based on the entity type.
Wikibase\Lib\Store\TypeDispatchingEntityStore::__construct | ( | array | $callbacks, |
EntityStore | $defaultStore, | ||
EntityRevisionLookup | $lookup ) |
callable[] | $callbacks | indexed by entity type |
EntityStore | $defaultStore | |
EntityRevisionLookup | $lookup |
Wikibase\Lib\Store\TypeDispatchingEntityStore::assignFreshId | ( | EntityDocument | $entity | ) |
EntityDocument | $entity |
StorageException |
Implements Wikibase\Lib\Store\EntityStore.
Wikibase\Lib\Store\TypeDispatchingEntityStore::canCreateWithCustomId | ( | EntityId | $id | ) |
EntityId | $id |
Implements Wikibase\Lib\Store\EntityStore.
Wikibase\Lib\Store\TypeDispatchingEntityStore::deleteEntity | ( | EntityId | $entityId, |
$reason, | |||
User | $user ) |
EntityId | $entityId | |
string | $reason | |
User | $user |
Implements Wikibase\Lib\Store\EntityStore.
|
private |
string | $entityType |
InvalidArgumentException |
Wikibase\Lib\Store\TypeDispatchingEntityStore::getWikiPageForEntity | ( | EntityId | $entityId | ) |
Wikibase\Lib\Store\TypeDispatchingEntityStore::isWatching | ( | User | $user, |
EntityId | $id ) |
User | $user | |
EntityId | $id |
Implements Wikibase\Lib\Store\EntityStore.
Wikibase\Lib\Store\TypeDispatchingEntityStore::saveEntity | ( | EntityDocument | $entity, |
$summary, | |||
User | $user, | ||
$flags = 0, | |||
$baseRevId = false, | |||
array | $tags = [] ) |
EntityDocument | $entity | |
string | $summary | |
User | $user | |
int | $flags | |
int | bool | $baseRevId | |
string[] | $tags |
StorageException | |
PermissionsError |
Implements Wikibase\Lib\Store\EntityStore.
Wikibase\Lib\Store\TypeDispatchingEntityStore::saveRedirect | ( | EntityRedirect | $redirect, |
$summary, | |||
User | $user, | ||
$flags = 0, | |||
$baseRevId = false, | |||
array | $tags = [] ) |
EntityRedirect | $redirect | |
string | $summary | |
User | $user | |
int | $flags | |
int | bool | $baseRevId |
StorageException | |
PermissionsError |
Implements Wikibase\Lib\Store\EntityStore.
Wikibase\Lib\Store\TypeDispatchingEntityStore::updateWatchlist | ( | User | $user, |
EntityId | $id, | ||
$watch ) |
User | $user | |
EntityId | $id | |
bool | $watch |
Implements Wikibase\Lib\Store\EntityStore.
Wikibase\Lib\Store\TypeDispatchingEntityStore::userWasLastToEdit | ( | User | $user, |
EntityId | $id, | ||
$lastRevId ) |
User | $user | |
EntityId | $id | |
int | $lastRevId |
Implements Wikibase\Lib\Store\EntityStore.
|
private |
|
private |
|
private |