MediaWiki
master
|
A value class to process existing log entries. More...
Public Member Functions | |
getAssociatedRevId () | |
getComment () | |
Get the user provided comment. More... | |
getDeleted () | |
Get the access restriction. More... | |
getId () | |
Returns the unique database id. More... | |
getParameters () | |
Get the extra parameters stored for this message. More... | |
getPerformerIdentity () | |
getSubtype () | |
The log subtype. More... | |
getTarget () | |
Get the target page of this action. More... | |
getTimestamp () | |
Get the timestamp when the action was executed. More... | |
getType () | |
The main log type. More... | |
isLegacy () | |
Whether the parameters for this log are stored in new or old format. More... | |
![]() | |
getFullType () | |
The full logtype in format maintype/subtype. More... | |
isDeleted ( $field) | |
Static Public Member Functions | |
static | getSelectQueryData () |
Returns array of information that is needed for querying log entries. More... | |
static | newFromId ( $id, IDatabase $db) |
Loads a LogEntry with the given id from database. More... | |
static | newFromRow ( $row) |
Constructs new LogEntry from database result row. More... | |
![]() | |
static | extractParams ( $blob) |
Extract a parameter array from a blob. More... | |
static | makeParamBlob ( $params) |
Create a blob from a parameter array. More... | |
Protected Member Functions | |
__construct ( $row) | |
getRawParameters () | |
Returns whatever is stored in the database field. More... | |
Protected Attributes | |
bool | $legacy |
Whether the parameters for this log entry are stored in new or old format. More... | |
array | $params |
Parameters for log entry. More... | |
UserIdentity | $performer |
int | $revId = null |
A rev id associated to the log entry. More... | |
stdClass | $row |
Database result row. More... | |
A value class to process existing log entries.
In other words, this class caches a log entry from the database and provides an immutable object-oriented representation of it.
This class should only be used in context of the LogFormatter class.
Definition at line 40 of file DatabaseLogEntry.php.
|
protected |
Definition at line 145 of file DatabaseLogEntry.php.
References $row.
DatabaseLogEntry::getAssociatedRevId | ( | ) |
Reimplemented in RCDatabaseLogEntry.
Definition at line 204 of file DatabaseLogEntry.php.
References $revId, and getParameters().
DatabaseLogEntry::getComment | ( | ) |
Get the user provided comment.
Implements LogEntry.
Reimplemented in RCDatabaseLogEntry.
Definition at line 242 of file DatabaseLogEntry.php.
DatabaseLogEntry::getDeleted | ( | ) |
Get the access restriction.
Implements LogEntry.
Reimplemented in RCDatabaseLogEntry.
Definition at line 247 of file DatabaseLogEntry.php.
DatabaseLogEntry::getId | ( | ) |
Returns the unique database id.
Reimplemented in RCDatabaseLogEntry.
Definition at line 154 of file DatabaseLogEntry.php.
Referenced by getPerformerIdentity().
DatabaseLogEntry::getParameters | ( | ) |
Get the extra parameters stored for this message.
Implements LogEntry.
Definition at line 181 of file DatabaseLogEntry.php.
References $blob, $params, LogEntryBase\extractParams(), LogPage\extractParams(), and getRawParameters().
Referenced by getAssociatedRevId(), and isLegacy().
DatabaseLogEntry::getPerformerIdentity | ( | ) |
Implements LogEntry.
Reimplemented in RCDatabaseLogEntry.
Definition at line 210 of file DatabaseLogEntry.php.
References getId().
|
protected |
Returns whatever is stored in the database field.
Reimplemented in RCDatabaseLogEntry.
Definition at line 163 of file DatabaseLogEntry.php.
Referenced by getParameters().
|
static |
Returns array of information that is needed for querying log entries.
Array contains the following keys: tables, fields, conds, options and join_conds
Since 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.
Reimplemented in RCDatabaseLogEntry.
Definition at line 53 of file DatabaseLogEntry.php.
Referenced by ChangeTagsLogList\doQuery(), LogPager\getQueryInfo(), and newFromId().
DatabaseLogEntry::getSubtype | ( | ) |
The log subtype.
Implements LogEntry.
Reimplemented in RCDatabaseLogEntry.
Definition at line 177 of file DatabaseLogEntry.php.
DatabaseLogEntry::getTarget | ( | ) |
Get the target page of this action.
Implements LogEntry.
Reimplemented in RCDatabaseLogEntry.
Definition at line 232 of file DatabaseLogEntry.php.
References Title\makeTitle().
DatabaseLogEntry::getTimestamp | ( | ) |
Get the timestamp when the action was executed.
Implements LogEntry.
Reimplemented in RCDatabaseLogEntry.
Definition at line 238 of file DatabaseLogEntry.php.
References wfTimestamp().
DatabaseLogEntry::getType | ( | ) |
The main log type.
Implements LogEntry.
Reimplemented in RCDatabaseLogEntry.
Definition at line 173 of file DatabaseLogEntry.php.
DatabaseLogEntry::isLegacy | ( | ) |
Whether the parameters for this log are stored in new or old format.
Reimplemented from LogEntryBase.
Definition at line 167 of file DatabaseLogEntry.php.
References $legacy, and getParameters().
|
static |
Loads a LogEntry with the given id from database.
int | $id | |
IDatabase | $db |
Reimplemented in RCDatabaseLogEntry.
Definition at line 113 of file DatabaseLogEntry.php.
References $row, getSelectQueryData(), newFromRow(), and Wikimedia\Rdbms\IDatabase\selectRow().
|
static |
Constructs new LogEntry from database result row.
Supports rows from both logging and recentchanges table.
stdClass | array | $row |
Definition at line 97 of file DatabaseLogEntry.php.
References $row.
Referenced by RevDelLogItem\getApiData(), LogEventsList\logLine(), newFromId(), and LogFormatter\newFromRow().
|
protected |
Whether the parameters for this log entry are stored in new or old format.
Definition at line 143 of file DatabaseLogEntry.php.
Referenced by isLegacy().
|
protected |
Parameters for log entry.
Definition at line 137 of file DatabaseLogEntry.php.
Referenced by getParameters().
|
protected |
Definition at line 134 of file DatabaseLogEntry.php.
|
protected |
A rev id associated to the log entry.
Definition at line 140 of file DatabaseLogEntry.php.
Referenced by getAssociatedRevId().
|
protected |
Database result row.
Definition at line 131 of file DatabaseLogEntry.php.
Referenced by __construct(), newFromId(), and newFromRow().