Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\Changes\AffectedPagesFinder Class Reference

Public Member Functions

 __construct (UsageLookup $usageLookup, TitleFactory $titleFactory, $siteId, $checkPageExistence=true)
 
 getAffectedUsagesByPage (Change $change)
 
 getChangedAspects (EntityChange $change)
 

Private Member Functions

 getChangedStatementAspects (array $diff)
 
 getChangedTermAspects ( $aspect, array $diff)
 
 getAffectedPages (EntityChange $change)
 Returns the page updates implied by the given the change.
 
 mergeUsagesInto (array $from, array &$into)
 
 getPagesReferencedInDiff (array $siteLinkDiff)
 
 isBadgesOnlyChange (array $siteLinkDiff)
 
 getTitlesFromTexts (array $names)
 
 makeVirtualUsages (array $titles, EntityId $entityId, array $aspects)
 
 transformAllPageEntityUsages (array $usages, EntityId $entityId, array $changedAspects)
 

Private Attributes

 $usageLookup
 
 $titleFactory
 
 $siteId
 
 $checkPageExistence
 
 $logger
 

Detailed Description

Author
Daniel Kinzler
Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\Changes\AffectedPagesFinder::__construct ( UsageLookup  $usageLookup,
TitleFactory  $titleFactory,
  $siteId,
  $checkPageExistence = true 
)
Parameters
UsageLookup$usageLookup
TitleFactory$titleFactory
string$siteId
bool$checkPageExistenceTo disable slow filtering that is not relevant in test scenarios. Not meant to be used in production!
Exceptions
InvalidArgumentException

Member Function Documentation

◆ getAffectedPages()

Wikibase\Client\Changes\AffectedPagesFinder::getAffectedPages ( EntityChange  $change)
private

Returns the page updates implied by the given the change.

Parameters
EntityChange$change
Returns
Traversable of PageEntityUsages

◆ getAffectedUsagesByPage()

Wikibase\Client\Changes\AffectedPagesFinder::getAffectedUsagesByPage ( Change  $change)
Parameters
Change$change
Returns
PageEntityUsages[]

◆ getChangedAspects()

Wikibase\Client\Changes\AffectedPagesFinder::getChangedAspects ( EntityChange  $change)
Parameters
EntityChange$change
Returns
string[]

◆ getChangedStatementAspects()

Wikibase\Client\Changes\AffectedPagesFinder::getChangedStatementAspects ( array  $diff)
private
Parameters
string[]$diff
Returns
string[]

◆ getChangedTermAspects()

Wikibase\Client\Changes\AffectedPagesFinder::getChangedTermAspects (   $aspect,
array  $diff 
)
private
Parameters
string$aspect
string[]$diff
Returns
string[]

◆ getPagesReferencedInDiff()

Wikibase\Client\Changes\AffectedPagesFinder::getPagesReferencedInDiff ( array  $siteLinkDiff)
private
Parameters
array[]$siteLinkDiff
Exceptions
UnexpectedValueException
Returns
string[]

◆ getTitlesFromTexts()

Wikibase\Client\Changes\AffectedPagesFinder::getTitlesFromTexts ( array  $names)
private
Parameters
string[]$names
Returns
Title[]

◆ isBadgesOnlyChange()

Wikibase\Client\Changes\AffectedPagesFinder::isBadgesOnlyChange ( array  $siteLinkDiff)
private
Parameters
array$siteLinkDiff
Returns
bool

◆ makeVirtualUsages()

Wikibase\Client\Changes\AffectedPagesFinder::makeVirtualUsages ( array  $titles,
EntityId  $entityId,
array  $aspects 
)
private
Parameters
Title[]$titles
EntityId$entityId
string[]$aspects
Returns
PageEntityUsages[]

◆ mergeUsagesInto()

Wikibase\Client\Changes\AffectedPagesFinder::mergeUsagesInto ( array  $from,
array &  $into 
)
private
Parameters
PageEntityUsages[]$from
PageEntityUsages[]&$intoArray to merge into

◆ transformAllPageEntityUsages()

Wikibase\Client\Changes\AffectedPagesFinder::transformAllPageEntityUsages ( array  $usages,
EntityId  $entityId,
array  $changedAspects 
)
private
Parameters
PageEntityUsages[]$usages
EntityId$entityId
string[]$changedAspects
Returns
PageEntityUsages[]

Member Data Documentation

◆ $checkPageExistence

Wikibase\Client\Changes\AffectedPagesFinder::$checkPageExistence
private

◆ $logger

Wikibase\Client\Changes\AffectedPagesFinder::$logger
private

◆ $siteId

Wikibase\Client\Changes\AffectedPagesFinder::$siteId
private

◆ $titleFactory

Wikibase\Client\Changes\AffectedPagesFinder::$titleFactory
private

◆ $usageLookup

Wikibase\Client\Changes\AffectedPagesFinder::$usageLookup
private

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