MediaWiki
master
Toggle main menu visibility
RecentChangeLookup.php
Go to the documentation of this file.
1
<?php
6
7
namespace
MediaWiki\RecentChanges;
8
9
use MediaWiki\Revision\RevisionRecord;
10
use Wikimedia\Assert\PreconditionException;
11
16
interface
RecentChangeLookup
{
23
public
function
getRecentChangeById
(
int
$rcid ): ?
RecentChange
;
24
33
public
function
getRecentChangeByConds
(
34
array $conds,
35
string
$fname = __METHOD__,
36
bool
$fromPrimary =
false
37
): ?
RecentChange
;
38
53
public
function
getRecentChangeByRevision
(
RevisionRecord
$rev,
int
$flags = 0 ): ?
RecentChange
;
54
60
public
function
getPrimarySources
(): array;
61
68
public
function
isFromPrimarySource
(
RecentChange
$rc ): bool;
69
75
public
function
getAllSources
(): array;
76
85
public
function
convertTypeToSources
( $type ): array;
86
94
public
function
convertSourceToType
(
string
$source
): string;
95
}
MediaWiki\RecentChanges\RecentChange
Utility class for creating and reading rows in the recentchanges table.
Definition
RecentChange.php:91
MediaWiki\Revision\RevisionRecord
Page revision base class.
Definition
RevisionRecord.php:35
MediaWiki\RecentChanges\RecentChangeLookup
Definition
RecentChangeLookup.php:16
MediaWiki\RecentChanges\RecentChangeLookup\convertSourceToType
convertSourceToType(string $source)
Convert an rc_source value to a legacy type string.
MediaWiki\RecentChanges\RecentChangeLookup\convertTypeToSources
convertTypeToSources( $type)
Convert a legacy type string, as used by the API, or an array of such strings, to an array of rc_sour...
MediaWiki\RecentChanges\RecentChangeLookup\getRecentChangeByRevision
getRecentChangeByRevision(RevisionRecord $rev, int $flags=0)
Get the RC object belonging to the latest revision, if there's one.
MediaWiki\RecentChanges\RecentChangeLookup\getRecentChangeByConds
getRecentChangeByConds(array $conds, string $fname=__METHOD__, bool $fromPrimary=false)
Get the first recent change matching some specific conditions.
MediaWiki\RecentChanges\RecentChangeLookup\getAllSources
getAllSources()
Get all known rc_source values.
MediaWiki\RecentChanges\RecentChangeLookup\getPrimarySources
getPrimarySources()
Get the rc_source values for events that are not replicated from elsewhere.
MediaWiki\RecentChanges\RecentChangeLookup\isFromPrimarySource
isFromPrimarySource(RecentChange $rc)
Check if a recent change is from a primary source.
MediaWiki\RecentChanges\RecentChangeLookup\getRecentChangeById
getRecentChangeById(int $rcid)
Get a recent change by its ID.
$source
$source
Definition
mwdoc-filter.php:36
includes
RecentChanges
RecentChangeLookup.php
Generated on
for MediaWiki by
1.18.0