MediaWiki  REL1_24
ManualLogEntry Class Reference

Class for creating log entries manually, for example to inject them into the database. More...

Inheritance diagram for ManualLogEntry:
Collaboration diagram for ManualLogEntry:

List of all members.

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 *.

Detailed Description

Class for creating log entries manually, for example to inject them into the database.

Since:
1.19

Definition at line 339 of file LogEntry.php.


Constructor & Destructor Documentation

ManualLogEntry::__construct ( type,
subtype 
)

Constructor.

Since:
1.19
Parameters:
string$type
string$subtype

Definition at line 368 of file LogEntry.php.

References $subtype, $type, and type.


Member Function Documentation

Get the user provided comment.

Returns:
string

Implements LogEntry.

Definition at line 626 of file LogEntry.php.

Get the access restriction.

Returns:
string

Implements LogEntry.

Definition at line 630 of file LogEntry.php.

Get the extra parameters stored for this message.

Returns:
array

Implements LogEntry.

Definition at line 602 of file LogEntry.php.

Returns:
User

Implements LogEntry.

Definition at line 609 of file LogEntry.php.

Get a RecentChanges object for the log entry.

Parameters:
int$newId
Returns:
RecentChange
Since:
1.23

Definition at line 536 of file LogEntry.php.

The log subtype.

Returns:
string

Implements LogEntry.

Definition at line 598 of file LogEntry.php.

Returns:
Title

Implements LogEntry.

Definition at line 616 of file LogEntry.php.

Get the timestamp when the action was executed.

Returns:
string

Implements LogEntry.

Definition at line 620 of file LogEntry.php.

The main log type.

Returns:
string

Implements LogEntry.

Definition at line 594 of file LogEntry.php.

ManualLogEntry::insert ( IDatabase dbw = null)

Inserts the entry into the logging table.

Parameters:
IDatabase$dbw
Returns:
int ID of the log entry
Exceptions:
MWException

Definition at line 465 of file LogEntry.php.

ManualLogEntry::publish ( newId,
to = 'rcandudp' 
)

Publishes the log entry.

Parameters:
int$newIdId of the log entry.
string$toOne of: rcandudp (default), rc, udp

Definition at line 575 of file LogEntry.php.

Set a comment associated with the action being logged.

Since:
1.19
Parameters:
string$comment

Definition at line 444 of file LogEntry.php.

TODO: document.

Since:
1.19
Parameters:
int$deleted

Definition at line 455 of file LogEntry.php.

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' );

Since:
1.19
Parameters:
array$parametersAssociative array

Definition at line 389 of file LogEntry.php.

Set the user that performed the action being logged.

Since:
1.19
Parameters:
User$performer

Definition at line 411 of file LogEntry.php.

Declare arbitrary tag/value relations to this log entry.

These can be used to filter log entries later on.

Parameters:
array$relationsMap of (tag => (list of values|value))
Since:
1.22

Definition at line 400 of file LogEntry.php.

Set the title of the object changed.

Since:
1.19
Parameters:
Title$target

Definition at line 422 of file LogEntry.php.

ManualLogEntry::setTimestamp ( timestamp)

Set the timestamp of when the logged action took place.

Since:
1.19
Parameters:
string$timestamp

Definition at line 433 of file LogEntry.php.


Member Data Documentation

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.

array ManualLogEntry::$parameters = array() [protected]

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.

array ManualLogEntry::$relations = array() [protected]

*

Definition at line 346 of file LogEntry.php.

string ManualLogEntry::$subtype [protected]

Sub type of log entry *.

Definition at line 342 of file LogEntry.php.

Referenced by __construct().

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]

Type of log entry *.

Definition at line 340 of file LogEntry.php.

Referenced by __construct().


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