MediaWiki  master
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. More...
 
 getDeleted ()
 Get the access restriction. More...
 
 getId ()
 Returns the unique database id. More...
 
 getParameters ()
 Get the extra parameters stored for this message. More...
 
 getPerformer ()
 Get the user for performed this action. More...
 
 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 ()
 
- Public Member Functions inherited from LogEntryBase
 getFullType ()
 The full logtype in format maintype/subtype. More...
 
 isDeleted ($field)
 
 isLegacy ()
 Whether the parameters for this log are stored in new or old format. More...
 

Static Public Member Functions

static getSelectQueryData ()
 Returns array of information that is needed for querying log entries. More...
 
static newFromRow ($row)
 Constructs new LogEntry from database result row. More...
 
- Static Public Member Functions inherited from LogEntryBase
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...
 
User $performer
 
int $revId = null
 A rev id associated to the log entry. More...
 
stdClass $row
 Database result row. More...
 

Detailed Description

This class wraps around database result row.

Since
1.19

Definition at line 163 of file LogEntry.php.

Constructor & Destructor Documentation

DatabaseLogEntry::__construct (   $row)
protected

Definition at line 227 of file LogEntry.php.

References $row.

Member Function Documentation

DatabaseLogEntry::getAssociatedRevId ( )

Definition at line 286 of file LogEntry.php.

References $revId, and getParameters().

DatabaseLogEntry::getComment ( )

Get the user provided comment.

Returns
string

Implements LogEntry.

Definition at line 324 of file LogEntry.php.

DatabaseLogEntry::getDeleted ( )

Get the access restriction.

Returns
string

Implements LogEntry.

Definition at line 328 of file LogEntry.php.

DatabaseLogEntry::getId ( )

Returns the unique database id.

Returns
int

Definition at line 236 of file LogEntry.php.

DatabaseLogEntry::getParameters ( )

Get the extra parameters stored for this message.

Returns
array

Implements LogEntry.

Definition at line 263 of file LogEntry.php.

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

Referenced by getAssociatedRevId(), and isLegacy().

DatabaseLogEntry::getPerformer ( )

Get the user for performed this action.

Returns
User

Implements LogEntry.

Definition at line 292 of file LogEntry.php.

References $performer, if, User\newFromId(), User\newFromName(), and User\newFromRow().

DatabaseLogEntry::getRawParameters ( )
protected

Returns whatever is stored in the database field.

Returns
string

Definition at line 245 of file LogEntry.php.

Referenced by getParameters().

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.

Referenced by ChangeTagsLogList\doQuery(), LogPager\getQueryInfo(), MediaWiki\Auth\AuthManagerTest\testAccountCreationLogging(), and MediaWiki\Auth\AuthManagerTest\testAutoAccountCreation().

DatabaseLogEntry::getSubtype ( )

The log subtype.

Returns
string

Implements LogEntry.

Definition at line 259 of file LogEntry.php.

DatabaseLogEntry::getTarget ( )

Get the target page of this action.

Returns
Title

Implements LogEntry.

Definition at line 312 of file LogEntry.php.

References $title, and Title\makeTitle().

DatabaseLogEntry::getTimestamp ( )

Get the timestamp when the action was executed.

Returns
string

Implements LogEntry.

Definition at line 320 of file LogEntry.php.

References wfTimestamp().

DatabaseLogEntry::getType ( )

The main log type.

Returns
string

Implements LogEntry.

Definition at line 255 of file LogEntry.php.

DatabaseLogEntry::isLegacy ( )

Definition at line 249 of file LogEntry.php.

References $legacy, and getParameters().

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 203 of file LogEntry.php.

References $row, and object.

Referenced by ApiQueryLogEvents\extractRowInfo(), RevDelLogItem\getApiData(), LogEventsList\logLine(), LogFormatter\newFromRow(), MediaWiki\Auth\AuthManagerTest\testAccountCreationLogging(), and MediaWiki\Auth\AuthManagerTest\testAutoAccountCreation().

Member Data Documentation

bool DatabaseLogEntry::$legacy
protected

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

Definition at line 225 of file LogEntry.php.

Referenced by isLegacy().

array DatabaseLogEntry::$params
protected

Parameters for log entry.

Definition at line 219 of file LogEntry.php.

Referenced by getParameters().

User DatabaseLogEntry::$performer
protected

Definition at line 216 of file LogEntry.php.

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

int DatabaseLogEntry::$revId = null
protected

A rev id associated to the log entry.

Definition at line 222 of file LogEntry.php.

Referenced by getAssociatedRevId().

stdClass DatabaseLogEntry::$row
protected

Database result row.

Definition at line 213 of file LogEntry.php.

Referenced by __construct(), and newFromRow().


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