MediaWiki master
MediaWiki\RecentChanges\RecentChangeLookup Interface Reference

Inherited by MediaWiki\RecentChanges\RecentChangeStore.

Public Member Functions

 convertSourceToType (string $source)
 Convert an rc_source value to a legacy type string.
 
 convertTypeToSources ( $type)
 Convert a legacy type string, as used by the API, or an array of such strings, to an array of rc_source values.
 
 getAllSources ()
 Get all known rc_source values.
 
 getPrimarySources ()
 Get the rc_source values for events that are not replicated from elsewhere.
 
 getRecentChangeByConds (array $conds, string $fname=__METHOD__, bool $fromPrimary=false)
 Get the first recent change matching some specific conditions.
 
 getRecentChangeById (int $rcid)
 Get a recent change by its ID.
 
 isFromPrimarySource (RecentChange $rc)
 Check if a recent change is from a primary source.
 

Detailed Description

Since
1.45

Definition at line 12 of file RecentChangeLookup.php.

Member Function Documentation

◆ convertSourceToType()

MediaWiki\RecentChanges\RecentChangeLookup::convertSourceToType ( string $source)

Convert an rc_source value to a legacy type string.

Since
1.45
Parameters
string$source
Returns
string

Implemented in MediaWiki\RecentChanges\RecentChangeStore.

◆ convertTypeToSources()

MediaWiki\RecentChanges\RecentChangeLookup::convertTypeToSources ( $type)

Convert a legacy type string, as used by the API, or an array of such strings, to an array of rc_source values.

Since
1.45
Parameters
string | string[]$type
Returns
string[]

Implemented in MediaWiki\RecentChanges\RecentChangeStore.

◆ getAllSources()

MediaWiki\RecentChanges\RecentChangeLookup::getAllSources ( )

Get all known rc_source values.

Returns
string[]

Implemented in MediaWiki\RecentChanges\RecentChangeStore.

◆ getPrimarySources()

MediaWiki\RecentChanges\RecentChangeLookup::getPrimarySources ( )

Get the rc_source values for events that are not replicated from elsewhere.

Returns
string[]

Implemented in MediaWiki\RecentChanges\RecentChangeStore.

◆ getRecentChangeByConds()

MediaWiki\RecentChanges\RecentChangeLookup::getRecentChangeByConds ( array $conds,
string $fname = __METHOD__,
bool $fromPrimary = false )

Get the first recent change matching some specific conditions.

Parameters
array$condsArray of conditions
string$fnameOverride the method name in profiling/logs
bool$fromPrimaryWhether to fetch from the primary database
Returns
RecentChange|null

Implemented in MediaWiki\RecentChanges\RecentChangeStore.

◆ getRecentChangeById()

MediaWiki\RecentChanges\RecentChangeLookup::getRecentChangeById ( int $rcid)

Get a recent change by its ID.

Parameters
int$rcidThe rc_id value to retrieve
Returns
RecentChange|null Null if no such recent change exists

Implemented in MediaWiki\RecentChanges\RecentChangeStore.

◆ isFromPrimarySource()

MediaWiki\RecentChanges\RecentChangeLookup::isFromPrimarySource ( RecentChange $rc)

Check if a recent change is from a primary source.

Parameters
RecentChange$rc
Returns
bool

Implemented in MediaWiki\RecentChanges\RecentChangeStore.


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