28use InvalidArgumentException;
48 throw new LogicException(
'Not implemented!' );
55 throw new LogicException(
'Not implemented!' );
60 return $this->row->rc_logid;
65 return $this->row->rc_params;
70 return $this->row->rc_this_oldid;
75 return $this->row->rc_log_type;
80 return $this->row->rc_log_action;
85 if ( !$this->performer ) {
88 if ( isset( $this->row->rc_actor ) ) {
90 $this->performer = $actorStore->newActorFromRowFields(
91 $this->row->rc_user ?? 0,
92 $this->row->rc_user_text,
95 }
catch ( InvalidArgumentException $e ) {
96 $this->performer = $actorStore->getUnknownActor();
97 LoggerFactory::getInstance(
'logentry' )->warning(
98 'Failed to instantiate RC log entry performer', [
100 'log_id' => $this->
getId()
104 } elseif ( isset( $this->row->rc_user ) ) {
105 $this->performer = $userFactory->newFromId( $this->row->rc_user )->getUser();
106 } elseif ( isset( $this->row->rc_user_text ) ) {
107 $user = $userFactory->newFromName( $this->row->rc_user_text );
109 $this->performer = $user->getUser();
111 $this->performer = $actorStore->getUnknownActor();
112 LoggerFactory::getInstance(
'logentry' )->warning(
113 'Failed to instantiate RC log entry performer', [
114 'rc_user_text' => $this->row->rc_user_text,
115 'log_id' => $this->getId()
126 $namespace = $this->row->rc_namespace;
127 $page = $this->row->rc_title;
133 return wfTimestamp( TS_MW, $this->row->rc_timestamp );
140 return $services->getCommentStore()
143 $services->getConnectionProvider()->getReplicaDatabase(),
151 return $this->row->rc_deleted;
156class_alias( RCDatabaseLogEntry::class,
'RCDatabaseLogEntry' );
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
if(!defined('MW_SETUP_CALLBACK'))
makeTitle( $linkId)
Convert a link ID to a Title.to override Title
A value class to process existing log entries.
A subclass of DatabaseLogEntry for objects constructed from entries in the recentchanges table (rathe...
static getSelectQueryData()
Returns array of information that is needed for querying log entries.Array contains the following key...
getComment()
Get the user provided comment.string
getTarget()
Get the target page of this action.Title
getRawParameters()
Returns whatever is stored in the database field (typically a serialized associative array but very o...
getDeleted()
Get the access restriction.int
getSubtype()
The log subtype.string
static newFromId( $id, IReadableDatabase $db)
Loads a LogEntry with the given id from database.DatabaseLogEntry|null
getPerformerIdentity()
1.36 UserIdentity
getTimestamp()
Get the timestamp when the action was executed.string TS_MW timestamp, a string with 14 digits
getId()
Returns the unique database id.int
getType()
The main log type.string