MediaWiki master
MediaWiki\Logging\RCDatabaseLogEntry Class Reference

A subclass of DatabaseLogEntry for objects constructed from entries in the recentchanges table (rather than the logging table). More...

Inherits MediaWiki\Logging\DatabaseLogEntry.

Collaboration diagram for MediaWiki\Logging\RCDatabaseLogEntry:

Public Member Functions

 getAssociatedRevId ()
 
Returns
int

 
 getComment ()
 Get the user provided comment.
Returns
string

 
 getDeleted ()
 Get the access restriction.
Returns
int

 
 getId ()
 Returns the unique database id.
Returns
int

 
 getPerformerIdentity ()
 
Since
1.36
Returns
UserIdentity

 
 getSubtype ()
 The log subtype.
Returns
string

 
 getTarget ()
 Get the target page of this action.
Returns
Title

 
 getTargetPage ()
 Get the target page of this action.
 
 getTimestamp ()
 Get the timestamp when the action was executed.
Returns
string TS::MW timestamp, a string with 14 digits

 
 getType ()
 The main log type.
Returns
string

 
- Public Member Functions inherited from MediaWiki\Logging\DatabaseLogEntry
 getParameters ()
 Get the extra parameters stored for this message.This will be in the same format as setParameters(), ie. the array keys might include message formatting prefixes.
Returns
array
See also
ManualLogEntry::setParameters() for message formatting prefixes.

 
 isLegacy ()
 Whether the parameters for this log are stored in new or old format.
 
- Public Member Functions inherited from MediaWiki\Logging\LogEntryBase
 getFullType ()
 The full logtype in format maintype/subtype.
Returns
string

 
 isDeleted ( $field)
 
Parameters
int$fieldOne of LogPage::DELETED_* bitfield constants
Returns
bool

 

Static Public Member Functions

static getSelectQueryData ()
 Returns array of information that is needed for querying log entries.Array contains the following keys: tables, fields, conds, options and join_condsSince 1.34, log_user and log_user_text have not been present in the database, but they continue to be available in query results as aliases.
Deprecated
since 1.41 use newSelectQueryBuilder() instead
Returns
array

 
static newFromId ( $id, IReadableDatabase $db)
 Loads a LogEntry with the given id from database.
Parameters
int$id
IReadableDatabase$db
Returns
self|null

 
- Static Public Member Functions inherited from MediaWiki\Logging\DatabaseLogEntry
static newFromRow ( $row, string|false $wikiId=WikiAwareEntity::LOCAL)
 Constructs new LogEntry from database result row.
 
static newSelectQueryBuilder (IReadableDatabase $db)
 
- Static Public Member Functions inherited from MediaWiki\Logging\LogEntryBase
static containsUnsafeParams (array $params)
 Whether the parameters for this log entry contain forbidden serialized data.
 
static extractParams ( $blob, ?string $logType=null)
 Extract a parameter array from a blob.
 
static makeParamBlob ( $params)
 Create a blob from a parameter array.
 

Protected Member Functions

 getRawParameters ()
 Returns whatever is stored in the database field (typically a serialized associative array but very old entries might have different formats).
Returns
string

 
- Protected Member Functions inherited from MediaWiki\Logging\DatabaseLogEntry
 __construct ( $row, protected string|false $wikiId=false)
 

Additional Inherited Members

- Protected Attributes inherited from MediaWiki\Logging\DatabaseLogEntry
bool $legacy
 Whether the parameters for this log entry are stored in new or old format.
 
array null $params
 Parameters for log entry.
 
UserIdentity $performer
 
int $revId = null
 A rev id associated to the log entry.
 
stdClass $row
 Database result row.
 

Detailed Description

A subclass of DatabaseLogEntry for objects constructed from entries in the recentchanges table (rather than the logging table).

This class should only be used in context of the LogFormatter class.

Definition at line 31 of file RCDatabaseLogEntry.php.

Member Function Documentation

◆ getAssociatedRevId()

MediaWiki\Logging\RCDatabaseLogEntry::getAssociatedRevId ( )

Returns
int

Reimplemented from MediaWiki\Logging\DatabaseLogEntry.

Definition at line 58 of file RCDatabaseLogEntry.php.

◆ getComment()

MediaWiki\Logging\RCDatabaseLogEntry::getComment ( )

Get the user provided comment.

Returns
string

Reimplemented from MediaWiki\Logging\DatabaseLogEntry.

Definition at line 132 of file RCDatabaseLogEntry.php.

◆ getDeleted()

MediaWiki\Logging\RCDatabaseLogEntry::getDeleted ( )

Get the access restriction.

Returns
int

Reimplemented from MediaWiki\Logging\DatabaseLogEntry.

Definition at line 145 of file RCDatabaseLogEntry.php.

◆ getId()

MediaWiki\Logging\RCDatabaseLogEntry::getId ( )

Returns the unique database id.

Returns
int

Reimplemented from MediaWiki\Logging\DatabaseLogEntry.

Definition at line 48 of file RCDatabaseLogEntry.php.

Referenced by MediaWiki\Logging\RCDatabaseLogEntry\getPerformerIdentity().

◆ getPerformerIdentity()

MediaWiki\Logging\RCDatabaseLogEntry::getPerformerIdentity ( )

Since
1.36
Returns
UserIdentity

Reimplemented from MediaWiki\Logging\DatabaseLogEntry.

Definition at line 73 of file RCDatabaseLogEntry.php.

References MediaWiki\Logging\RCDatabaseLogEntry\getId(), and MediaWiki\MediaWikiServices\getInstance().

◆ getRawParameters()

MediaWiki\Logging\RCDatabaseLogEntry::getRawParameters ( )
protected

Returns whatever is stored in the database field (typically a serialized associative array but very old entries might have different formats).

Returns
string

Reimplemented from MediaWiki\Logging\DatabaseLogEntry.

Definition at line 53 of file RCDatabaseLogEntry.php.

◆ getSelectQueryData()

static MediaWiki\Logging\RCDatabaseLogEntry::getSelectQueryData ( )
static

Returns array of information that is needed for querying log entries.Array contains the following keys: tables, fields, conds, options and join_condsSince 1.34, log_user and log_user_text have not been present in the database, but they continue to be available in query results as aliases.

Deprecated
since 1.41 use newSelectQueryBuilder() instead
Returns
array

Reimplemented from MediaWiki\Logging\DatabaseLogEntry.

Definition at line 41 of file RCDatabaseLogEntry.php.

◆ getSubtype()

MediaWiki\Logging\RCDatabaseLogEntry::getSubtype ( )

The log subtype.

Returns
string

Reimplemented from MediaWiki\Logging\DatabaseLogEntry.

Definition at line 68 of file RCDatabaseLogEntry.php.

◆ getTarget()

MediaWiki\Logging\RCDatabaseLogEntry::getTarget ( )

Get the target page of this action.

Returns
Title

Reimplemented from MediaWiki\Logging\DatabaseLogEntry.

Definition at line 114 of file RCDatabaseLogEntry.php.

References MediaWiki\Deferred\LinksUpdate\CategoryLinksTable\makeTitle().

◆ getTargetPage()

MediaWiki\Logging\RCDatabaseLogEntry::getTargetPage ( )

Get the target page of this action.

Since
1.46

Reimplemented from MediaWiki\Logging\DatabaseLogEntry.

Definition at line 120 of file RCDatabaseLogEntry.php.

◆ getTimestamp()

MediaWiki\Logging\RCDatabaseLogEntry::getTimestamp ( )

Get the timestamp when the action was executed.

Returns
string TS::MW timestamp, a string with 14 digits

Reimplemented from MediaWiki\Logging\DatabaseLogEntry.

Definition at line 127 of file RCDatabaseLogEntry.php.

References wfTimestamp().

◆ getType()

MediaWiki\Logging\RCDatabaseLogEntry::getType ( )

The main log type.

Returns
string

Reimplemented from MediaWiki\Logging\DatabaseLogEntry.

Definition at line 63 of file RCDatabaseLogEntry.php.

◆ newFromId()

static MediaWiki\Logging\RCDatabaseLogEntry::newFromId ( $id,
IReadableDatabase $db )
static

Loads a LogEntry with the given id from database.

Parameters
int$id
IReadableDatabase$db
Returns
self|null

Reimplemented from MediaWiki\Logging\DatabaseLogEntry.

Definition at line 34 of file RCDatabaseLogEntry.php.


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