MediaWiki
REL1_19
|
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 () | |
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. | |
insert () | |
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. | |
setTarget (Title $target) | |
Set the title of the object changed. | |
setTimestamp ($timestamp) | |
Set the timestamp of when the logged action took place. | |
Protected Attributes | |
$comment = '' | |
$deleted | |
$parameters = array() | |
$performer | |
$subtype | |
$target | |
$timestamp | |
$type |
Class for creating log entries manually, for example to inject them into the database.
Definition at line 310 of file LogEntry.php.
ManualLogEntry::__construct | ( | $ | type, |
$ | subtype | ||
) |
Constructor.
string | $type | |
string | $subtype |
Definition at line 328 of file LogEntry.php.
Get the user provided comment.
Implements LogEntry.
Definition at line 510 of file LogEntry.php.
Referenced by insert(), and publish().
Get the access restriction.
Implements LogEntry.
Definition at line 514 of file LogEntry.php.
Get the extra parameters stored for this message.
Implements LogEntry.
Definition at line 493 of file LogEntry.php.
Referenced by insert(), and publish().
The log subtype.
Implements LogEntry.
Definition at line 489 of file LogEntry.php.
Referenced by insert(), and publish().
Get the timestamp when the action was executed.
Implements LogEntry.
Definition at line 505 of file LogEntry.php.
References wfTimestamp(), and wfTimestampNow().
Referenced by publish().
The main log type.
Implements LogEntry.
Definition at line 485 of file LogEntry.php.
Referenced by insert(), and publish().
Inserts the entry into the logging table.
Definition at line 412 of file LogEntry.php.
References $comment, $wgContLang, getComment(), getParameters(), getPerformer(), getSubtype(), getTarget(), getType(), wfGetDB(), and wfTimestampNow().
ManualLogEntry::publish | ( | $ | newId, |
$ | to = 'rcandudp' |
||
) |
Publishes the log entry.
$newId | int id of the log entry. |
$to | string: rcandudp (default), rc, udp |
Definition at line 448 of file LogEntry.php.
References $user, getComment(), getParameters(), getPerformer(), getSubtype(), getTarget(), getTimestamp(), SpecialPage\getTitleFor(), getType(), RequestContext\newExtraneousContext(), LogFormatter\newFromEntry(), and RecentChange\newLogEntry().
ManualLogEntry::setComment | ( | $ | comment | ) |
Set a comment associated with the action being logged.
string | $comment |
Definition at line 393 of file LogEntry.php.
References $comment.
ManualLogEntry::setDeleted | ( | $ | deleted | ) |
TODO: document.
integer | $deleted |
Definition at line 404 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' );
$parameters | Associative array |
Definition at line 349 of file LogEntry.php.
References $parameters.
ManualLogEntry::setPerformer | ( | User $ | performer | ) |
Set the user that performed the action being logged.
User | $performer |
Definition at line 360 of file LogEntry.php.
References $performer.
ManualLogEntry::setTarget | ( | Title $ | target | ) |
Set the title of the object changed.
Title | $target |
Definition at line 371 of file LogEntry.php.
References $target.
ManualLogEntry::setTimestamp | ( | $ | timestamp | ) |
Set the timestamp of when the logged action took place.
string | $timestamp |
Definition at line 382 of file LogEntry.php.
References $timestamp.
ManualLogEntry::$comment = '' [protected] |
Definition at line 317 of file LogEntry.php.
Referenced by insert(), and setComment().
ManualLogEntry::$deleted [protected] |
Definition at line 318 of file LogEntry.php.
Referenced by setDeleted().
ManualLogEntry::$parameters = array() [protected] |
Definition at line 313 of file LogEntry.php.
Referenced by setParameters().
ManualLogEntry::$performer [protected] |
Definition at line 314 of file LogEntry.php.
Referenced by setPerformer().
ManualLogEntry::$subtype [protected] |
Definition at line 312 of file LogEntry.php.
Referenced by __construct().
ManualLogEntry::$target [protected] |
Definition at line 315 of file LogEntry.php.
Referenced by setTarget().
ManualLogEntry::$timestamp [protected] |
Definition at line 316 of file LogEntry.php.
Referenced by setTimestamp().
ManualLogEntry::$type [protected] |
Definition at line 311 of file LogEntry.php.
Referenced by __construct().