|
Wikibase
MediaWiki Wikibase extension
|
Service interface for tracking the usage of entities across pages on the local wiki. More...
Inheritance diagram for Wikibase\Client\Usage\UsageTracker:Public Member Functions | |
| addUsedEntities ( $pageId, array $usages) | |
| Adds new entity usage information for the given page. | |
| replaceUsedEntities ( $pageId, array $usages) | |
| Replaces entity usage information for the given page. | |
| pruneUsages ( $pageId) | |
| Removes all usage tracking entries for a given page. | |
Service interface for tracking the usage of entities across pages on the local wiki.
| Wikibase\Client\Usage\UsageTracker::addUsedEntities | ( | $pageId, | |
| array | $usages | ||
| ) |
Adds new entity usage information for the given page.
New usage records are added, but old ones are not removed.
| int | $pageId | The ID of the page the entities are used on. |
| EntityUsage[] | $usages | A list of entity usages. |
| UsageTrackerException |
Implemented in Wikibase\Client\Usage\NullUsageTracker, and Wikibase\Client\Usage\Sql\SqlUsageTracker.
| Wikibase\Client\Usage\UsageTracker::pruneUsages | ( | $pageId | ) |
Removes all usage tracking entries for a given page.
| int | $pageId |
| UsageTrackerException |
Implemented in Wikibase\Client\Usage\NullUsageTracker, and Wikibase\Client\Usage\Sql\SqlUsageTracker.
| Wikibase\Client\Usage\UsageTracker::replaceUsedEntities | ( | $pageId, | |
| array | $usages | ||
| ) |
Replaces entity usage information for the given page.
All usages not present in $usages will be removed.
| int | $pageId | The ID of the page the entities are used on. |
| EntityUsage[] | $usages | A list of entity usages. |
| UsageTrackerException |
Implemented in Wikibase\Client\Usage\NullUsageTracker, and Wikibase\Client\Usage\Sql\SqlUsageTracker.