MediaWiki REL1_30
DatabaseLogEntry Class Reference

This class wraps around database result row. More...

Inheritance diagram for DatabaseLogEntry:
Collaboration diagram for DatabaseLogEntry:

Public Member Functions

 getAssociatedRevId ()
 
 getComment ()
 Get the user provided comment.
 
 getDeleted ()
 Get the access restriction.
 
 getId ()
 Returns the unique database id.
 
 getParameters ()
 Get the extra parameters stored for this message.
 
 getPerformer ()
 Get the user for performed this action.
 
 getSubtype ()
 The log subtype.
 
 getTarget ()
 Get the target page of this action.
 
 getTimestamp ()
 Get the timestamp when the action was executed.
 
 getType ()
 The main log type.
 
 isLegacy ()
 Whether the parameters for this log are stored in new or old format.
 
- Public Member Functions inherited from LogEntryBase
 getFullType ()
 The full logtype in format maintype/subtype.
 
 isDeleted ( $field)
 

Static Public Member Functions

static getSelectQueryData ()
 Returns array of information that is needed for querying log entries.
 
static newFromRow ( $row)
 Constructs new LogEntry from database result row.
 
- Static Public Member Functions inherited from LogEntryBase
static extractParams ( $blob)
 Extract a parameter array from a blob.
 
static makeParamBlob ( $params)
 Create a blob from a parameter array.
 

Protected Member Functions

 __construct ( $row)
 
 getRawParameters ()
 Returns whatever is stored in the database field.
 

Protected Attributes

bool $legacy
 Whether the parameters for this log entry are stored in new or old format.
 
array $params
 Parameters for log entry.
 
User $performer
 
int $revId = null
 A rev id associated to the log entry.
 
stdClass $row
 Database result row.
 

Detailed Description

This class wraps around database result row.

Since
1.19

Definition at line 163 of file LogEntry.php.

Constructor & Destructor Documentation

◆ __construct()

DatabaseLogEntry::__construct ( $row)
protected

Definition at line 229 of file LogEntry.php.

References $row.

Member Function Documentation

◆ getAssociatedRevId()

DatabaseLogEntry::getAssociatedRevId ( )

Reimplemented in RCDatabaseLogEntry.

Definition at line 288 of file LogEntry.php.

References $revId, and getParameters().

◆ getComment()

DatabaseLogEntry::getComment ( )

Get the user provided comment.

Returns
string

Implements LogEntry.

Reimplemented in RCDatabaseLogEntry.

Definition at line 326 of file LogEntry.php.

References CommentStore\newKey().

◆ getDeleted()

DatabaseLogEntry::getDeleted ( )

Get the access restriction.

Returns
string

Implements LogEntry.

Reimplemented in RCDatabaseLogEntry.

Definition at line 330 of file LogEntry.php.

◆ getId()

DatabaseLogEntry::getId ( )

Returns the unique database id.

Returns
int

Reimplemented in RCDatabaseLogEntry.

Definition at line 238 of file LogEntry.php.

◆ getParameters()

DatabaseLogEntry::getParameters ( )

Get the extra parameters stored for this message.

Returns
array

Implements LogEntry.

Definition at line 265 of file LogEntry.php.

References $blob, $params, LogEntryBase\extractParams(), LogPage\extractParams(), and getRawParameters().

Referenced by getAssociatedRevId(), and isLegacy().

◆ getPerformer()

DatabaseLogEntry::getPerformer ( )

Get the user for performed this action.

Returns
User

Implements LogEntry.

Reimplemented in RCDatabaseLogEntry.

Definition at line 294 of file LogEntry.php.

References $performer.

◆ getRawParameters()

DatabaseLogEntry::getRawParameters ( )
protected

Returns whatever is stored in the database field.

Returns
string

Reimplemented in RCDatabaseLogEntry.

Definition at line 247 of file LogEntry.php.

Referenced by getParameters().

◆ getSelectQueryData()

static DatabaseLogEntry::getSelectQueryData ( )
static

Returns array of information that is needed for querying log entries.

Array contains the following keys: tables, fields, conds, options and join_conds

Returns
array

Definition at line 172 of file LogEntry.php.

References $tables, and CommentStore\newKey().

Referenced by ChangeTagsLogList\doQuery(), and LogPager\getQueryInfo().

◆ getSubtype()

DatabaseLogEntry::getSubtype ( )

The log subtype.

Returns
string

Implements LogEntry.

Reimplemented in RCDatabaseLogEntry.

Definition at line 261 of file LogEntry.php.

◆ getTarget()

DatabaseLogEntry::getTarget ( )

Get the target page of this action.

Returns
Title

Implements LogEntry.

Reimplemented in RCDatabaseLogEntry.

Definition at line 314 of file LogEntry.php.

References $title.

◆ getTimestamp()

DatabaseLogEntry::getTimestamp ( )

Get the timestamp when the action was executed.

Returns
string

Implements LogEntry.

Reimplemented in RCDatabaseLogEntry.

Definition at line 322 of file LogEntry.php.

References wfTimestamp().

◆ getType()

DatabaseLogEntry::getType ( )

The main log type.

Returns
string

Implements LogEntry.

Reimplemented in RCDatabaseLogEntry.

Definition at line 257 of file LogEntry.php.

◆ isLegacy()

DatabaseLogEntry::isLegacy ( )

Whether the parameters for this log are stored in new or old format.

Returns
bool

Reimplemented from LogEntryBase.

Definition at line 251 of file LogEntry.php.

References $legacy, and getParameters().

◆ newFromRow()

static DatabaseLogEntry::newFromRow ( $row)
static

Constructs new LogEntry from database result row.

Supports rows from both logging and recentchanges table.

Parameters
stdClass | array$row
Returns
DatabaseLogEntry

Definition at line 205 of file LogEntry.php.

References $row, and object.

Referenced by ApiQueryLogEvents\extractRowInfo(), RevDelLogItem\getApiData(), LogEventsList\logLine(), and LogFormatter\newFromRow().

Member Data Documentation

◆ $legacy

bool DatabaseLogEntry::$legacy
protected

Whether the parameters for this log entry are stored in new or old format.

Definition at line 227 of file LogEntry.php.

Referenced by isLegacy().

◆ $params

array DatabaseLogEntry::$params
protected

Parameters for log entry.

Definition at line 221 of file LogEntry.php.

Referenced by getParameters().

◆ $performer

User DatabaseLogEntry::$performer
protected

Definition at line 218 of file LogEntry.php.

Referenced by getPerformer(), and RCDatabaseLogEntry\getPerformer().

◆ $revId

int DatabaseLogEntry::$revId = null
protected

A rev id associated to the log entry.

Definition at line 224 of file LogEntry.php.

Referenced by getAssociatedRevId().

◆ $row

stdClass DatabaseLogEntry::$row
protected

Database result row.

Definition at line 215 of file LogEntry.php.

Referenced by __construct(), and newFromRow().


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