This class de-duplicates entity usages for performance and storage reasons.
More...
This class de-duplicates entity usages for performance and storage reasons.
- Copyright
- GPL-2.0-or-later
- Author
- Amir Sarabadani
◆ __construct()
Wikibase\Client\Usage\UsageDeduplicator::__construct |
( |
array |
$usageModifierLimits | ) |
|
- Parameters
-
int[] | $usageModifierLimits | associative array mapping usage type to the limit |
◆ deduplicate()
Wikibase\Client\Usage\UsageDeduplicator::deduplicate |
( |
array |
$usages | ) |
|
- Parameters
-
- Returns
- EntityUsage[]
◆ deduplicatePerAspect()
Wikibase\Client\Usage\UsageDeduplicator::deduplicatePerAspect |
( |
array & |
$usages | ) |
|
|
private |
◆ deduplicateStructuredUsages()
Wikibase\Client\Usage\UsageDeduplicator::deduplicateStructuredUsages |
( |
array |
$structuredUsages | ) |
|
|
private |
- Parameters
-
array[][] | $structuredUsages | |
- Returns
- array[]
◆ flattenStructuredUsages()
Wikibase\Client\Usage\UsageDeduplicator::flattenStructuredUsages |
( |
array |
$structuredUsages | ) |
|
|
private |
- Parameters
-
- Returns
- EntityUsage[]
◆ limitPerAspect()
Wikibase\Client\Usage\UsageDeduplicator::limitPerAspect |
( |
|
$aspect, |
|
|
array & |
$usages |
|
) |
| |
|
private |
- Parameters
-
string | $aspect | |
EntityUsage[] | &$usages | |
◆ structureUsages()
Wikibase\Client\Usage\UsageDeduplicator::structureUsages |
( |
array |
$usages | ) |
|
|
private |
- Parameters
-
- Returns
- array[][] three-dimensional array of [ $entityId => [ $aspectKey => [ EntityUsage $usage, … ], … ], … ]
◆ $usageModifierLimits
Wikibase\Client\Usage\UsageDeduplicator::$usageModifierLimits |
|
private |
The documentation for this class was generated from the following file: