MediaWiki
1.23.2
|
Class for creating log entries manually, for example to inject them into the database. More...
Public Member Functions | |
__construct ( $type, $subtype) | |
Constructor. More... | |
getComment () | |
Get the user provided comment. More... | |
getDeleted () | |
Get the access restriction. More... | |
getParameters () | |
Get the extra parameters stored for this message. More... | |
getPerformer () | |
getRecentChange ( $newId=0) | |
Get a RecentChanges object for the log entry. More... | |
getSubtype () | |
The log subtype. More... | |
getTarget () | |
getTimestamp () | |
Get the timestamp when the action was executed. More... | |
getType () | |
The main log type. More... | |
insert (IDatabase $dbw=null) | |
Inserts the entry into the logging table. More... | |
publish ( $newId, $to='rcandudp') | |
Publishes the log entry. More... | |
setComment ( $comment) | |
Set a comment associated with the action being logged. More... | |
setDeleted ( $deleted) | |
TODO: document. More... | |
setParameters ( $parameters) | |
Set extra log parameters. More... | |
setPerformer (User $performer) | |
Set the user that performed the action being logged. More... | |
setRelations (array $relations) | |
Declare arbitrary tag/value relations to this log entry. More... | |
setTarget (Title $target) | |
Set the title of the object changed. More... | |
setTimestamp ( $timestamp) | |
Set the timestamp of when the logged action took place. More... | |
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... | |
Protected Attributes | |
string | $comment = '' |
Comment for the log entry *. More... | |
int | $deleted |
Deletion state of the log entry *. More... | |
int | $id |
ID of the log entry *. More... | |
array | $parameters = array() |
Parameters for log entry *. More... | |
User | $performer |
Performer of the action for the log entry *. More... | |
array | $relations = array() |
string | $subtype |
Sub type of log entry *. More... | |
Title | $target |
Target title for the log entry *. More... | |
string | $timestamp |
Timestamp of creation of the log entry *. More... | |
string | $type |
Type of log entry *. More... | |
Class for creating log entries manually, for example to inject them into the database.
Definition at line 339 of file LogEntry.php.
ManualLogEntry::__construct | ( | $type, | |
$subtype | |||
) |
Constructor.
string | $type | |
string | $subtype |
Definition at line 368 of file LogEntry.php.
ManualLogEntry::getComment | ( | ) |
Get the user provided comment.
Implements LogEntry.
Definition at line 613 of file LogEntry.php.
References $comment.
Referenced by getRecentChange(), and insert().
ManualLogEntry::getDeleted | ( | ) |
Get the access restriction.
Implements LogEntry.
Definition at line 617 of file LogEntry.php.
References $deleted.
ManualLogEntry::getParameters | ( | ) |
Get the extra parameters stored for this message.
Implements LogEntry.
Definition at line 589 of file LogEntry.php.
References $parameters.
Referenced by getRecentChange(), and insert().
ManualLogEntry::getPerformer | ( | ) |
Implements LogEntry.
Definition at line 596 of file LogEntry.php.
References $performer.
Referenced by getRecentChange(), and insert().
ManualLogEntry::getRecentChange | ( | $newId = 0 | ) |
Get a RecentChanges object for the log entry.
int | $newId |
Definition at line 523 of file LogEntry.php.
References $user, array(), getComment(), getParameters(), getPerformer(), getSubtype(), getTarget(), getTimestamp(), SpecialPage\getTitleFor(), getType(), IP\isIPAddress(), RequestContext\newExtraneousContext(), LogFormatter\newFromEntry(), and RecentChange\newLogEntry().
Referenced by publish().
ManualLogEntry::getSubtype | ( | ) |
The log subtype.
Implements LogEntry.
Definition at line 585 of file LogEntry.php.
References $subtype.
Referenced by getRecentChange(), and insert().
ManualLogEntry::getTarget | ( | ) |
Implements LogEntry.
Definition at line 603 of file LogEntry.php.
References $target.
Referenced by getRecentChange(), and insert().
ManualLogEntry::getTimestamp | ( | ) |
Get the timestamp when the action was executed.
Implements LogEntry.
Definition at line 607 of file LogEntry.php.
References TS_MW, wfTimestamp(), and wfTimestampNow().
Referenced by getRecentChange().
ManualLogEntry::getType | ( | ) |
The main log type.
Implements LogEntry.
Definition at line 581 of file LogEntry.php.
References $type.
Referenced by getRecentChange(), insert(), and publish().
ManualLogEntry::insert | ( | IDatabase | $dbw = null | ) |
Inserts the entry into the logging table.
IDatabase | $dbw |
MWException |
Definition at line 465 of file LogEntry.php.
References $comment, $id, $value, $wgContLang, array(), as, DB_MASTER, getComment(), getParameters(), getPerformer(), getSubtype(), getTarget(), getType(), global, wfGetDB(), and wfTimestampNow().
ManualLogEntry::publish | ( | $newId, | |
$to = 'rcandudp' |
|||
) |
Publishes the log entry.
int | $newId | id of the log entry. |
string | $to | rcandudp (default), rc, udp |
Definition at line 562 of file LogEntry.php.
References getRecentChange(), and getType().
ManualLogEntry::setComment | ( | $comment | ) |
Set a comment associated with the action being logged.
string | $comment |
Definition at line 444 of file LogEntry.php.
References $comment.
ManualLogEntry::setDeleted | ( | $deleted | ) |
TODO: document.
integer | $deleted |
Definition at line 455 of file LogEntry.php.
References $deleted.
ManualLogEntry::setParameters | ( | $parameters | ) |
Set extra log parameters.
You can pass params to the log action message by prefixing the keys with a number and colon. The numbering should start with number 4, the first three parameters are hardcoded for every message. Example: $entry->setParameters( '4:color' => 'blue', 'animal' => 'dog' );
array | $parameters | Associative array |
Definition at line 389 of file LogEntry.php.
References $parameters.
ManualLogEntry::setPerformer | ( | User | $performer | ) |
Set the user that performed the action being logged.
User | $performer |
Definition at line 411 of file LogEntry.php.
References $performer.
ManualLogEntry::setRelations | ( | array | $relations | ) |
Declare arbitrary tag/value relations to this log entry.
These can be used to filter log entries later on.
array | $relations | Map of (tag => (list of values)) |
Definition at line 400 of file LogEntry.php.
References $relations.
ManualLogEntry::setTarget | ( | Title | $target | ) |
Set the title of the object changed.
Title | $target |
Definition at line 422 of file LogEntry.php.
References $target.
ManualLogEntry::setTimestamp | ( | $timestamp | ) |
Set the timestamp of when the logged action took place.
string | $timestamp |
Definition at line 433 of file LogEntry.php.
References $timestamp.
|
protected |
Comment for the log entry *.
Definition at line 354 of file LogEntry.php.
Referenced by getComment(), insert(), and setComment().
|
protected |
Deletion state of the log entry *.
Definition at line 356 of file LogEntry.php.
Referenced by getDeleted(), and setDeleted().
|
protected |
Parameters for log entry *.
Definition at line 344 of file LogEntry.php.
Referenced by getParameters(), and setParameters().
|
protected |
Performer of the action for the log entry *.
Definition at line 348 of file LogEntry.php.
Referenced by getPerformer(), and setPerformer().
|
protected |
Sub type of log entry *.
Definition at line 342 of file LogEntry.php.
Referenced by __construct(), and getSubtype().
|
protected |
Target title for the log entry *.
Definition at line 350 of file LogEntry.php.
Referenced by getTarget(), and setTarget().
|
protected |
Timestamp of creation of the log entry *.
Definition at line 352 of file LogEntry.php.
Referenced by setTimestamp().
|
protected |
Type of log entry *.
Definition at line 340 of file LogEntry.php.
Referenced by __construct(), and getType().