MediaWiki
REL1_24
|
Class for creating log entries manually, for example to inject them into the database. More...
Public Member Functions | |
__construct ($type, $subtype) | |
Constructor. | |
getComment () | |
Get the user provided comment. | |
getDeleted () | |
Get the access restriction. | |
getParameters () | |
Get the extra parameters stored for this message. | |
getPerformer () | |
getRecentChange ($newId=0) | |
Get a RecentChanges object for the log entry. | |
getSubtype () | |
The log subtype. | |
getTarget () | |
getTimestamp () | |
Get the timestamp when the action was executed. | |
getType () | |
The main log type. | |
insert (IDatabase $dbw=null) | |
Inserts the entry into the logging table. | |
publish ($newId, $to= 'rcandudp') | |
Publishes the log entry. | |
setComment ($comment) | |
Set a comment associated with the action being logged. | |
setDeleted ($deleted) | |
TODO: document. | |
setParameters ($parameters) | |
Set extra log parameters. | |
setPerformer (User $performer) | |
Set the user that performed the action being logged. | |
setRelations (array $relations) | |
Declare arbitrary tag/value relations to this log entry. | |
setTarget (Title $target) | |
Set the title of the object changed. | |
setTimestamp ($timestamp) | |
Set the timestamp of when the logged action took place. | |
Protected Attributes | |
string | $comment = '' |
Comment for the log entry *. | |
int | $deleted |
Deletion state of the log entry *. | |
int | $id |
ID of the log entry *. | |
array | $parameters = array() |
Parameters for log entry *. | |
User | $performer |
Performer of the action for the log entry *. | |
array | $relations = array() |
* | |
string | $subtype |
Sub type of log entry *. | |
Title | $target |
Target title for the log entry *. | |
string | $timestamp |
Timestamp of creation of the log entry *. | |
string | $type |
Type of log entry *. |
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.
Get the user provided comment.
Implements LogEntry.
Definition at line 626 of file LogEntry.php.
Get the access restriction.
Implements LogEntry.
Definition at line 630 of file LogEntry.php.
Get the extra parameters stored for this message.
Implements LogEntry.
Definition at line 602 of file LogEntry.php.
ManualLogEntry::getRecentChange | ( | $ | newId = 0 | ) |
Get a RecentChanges object for the log entry.
int | $newId |
Definition at line 536 of file LogEntry.php.
Get the timestamp when the action was executed.
Implements LogEntry.
Definition at line 620 of file LogEntry.php.
ManualLogEntry::insert | ( | IDatabase $ | dbw = null | ) |
Inserts the entry into the logging table.
IDatabase | $dbw |
MWException |
Definition at line 465 of file LogEntry.php.
ManualLogEntry::publish | ( | $ | newId, |
$ | to = 'rcandudp' |
||
) |
Publishes the log entry.
int | $newId | Id of the log entry. |
string | $to | One of: rcandudp (default), rc, udp |
Definition at line 575 of file LogEntry.php.
ManualLogEntry::setComment | ( | $ | comment | ) |
Set a comment associated with the action being logged.
string | $comment |
Definition at line 444 of file LogEntry.php.
ManualLogEntry::setDeleted | ( | $ | 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.
ManualLogEntry::setPerformer | ( | User $ | performer | ) |
Set the user that performed the action being logged.
User | $performer |
Definition at line 411 of file LogEntry.php.
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|value)) |
Definition at line 400 of file LogEntry.php.
ManualLogEntry::setTarget | ( | Title $ | target | ) |
Set the title of the object changed.
Title | $target |
Definition at line 422 of file LogEntry.php.
ManualLogEntry::setTimestamp | ( | $ | timestamp | ) |
Set the timestamp of when the logged action took place.
string | $timestamp |
Definition at line 433 of file LogEntry.php.
string ManualLogEntry::$comment = '' [protected] |
Comment for the log entry *.
Definition at line 354 of file LogEntry.php.
int ManualLogEntry::$deleted [protected] |
Deletion state of the log entry *.
Definition at line 356 of file LogEntry.php.
int ManualLogEntry::$id [protected] |
ID of the log entry *.
Definition at line 358 of file LogEntry.php.
Parameters for log entry *.
Definition at line 344 of file LogEntry.php.
User ManualLogEntry::$performer [protected] |
Performer of the action for the log entry *.
Definition at line 348 of file LogEntry.php.
*
Definition at line 346 of file LogEntry.php.
string ManualLogEntry::$subtype [protected] |
Title ManualLogEntry::$target [protected] |
Target title for the log entry *.
Definition at line 350 of file LogEntry.php.
string ManualLogEntry::$timestamp [protected] |
Timestamp of creation of the log entry *.
Definition at line 352 of file LogEntry.php.
string ManualLogEntry::$type [protected] |