14use InvalidArgumentException;
21use Wikimedia\Timestamp\TimestampFormat as TS;
35 throw new LogicException(
'Not implemented!' );
42 throw new LogicException(
'Not implemented!' );
47 return $this->row->rc_logid;
52 return $this->row->rc_params;
57 return $this->row->rc_this_oldid;
62 return $this->row->rc_log_type;
67 return $this->row->rc_log_action;
72 if ( !$this->performer ) {
75 if ( isset( $this->row->rc_actor ) ) {
77 $this->performer = $actorStore->newActorFromRowFields(
78 $this->row->rc_user ?? 0,
79 $this->row->rc_user_text,
82 }
catch ( InvalidArgumentException $e ) {
83 $this->performer = $actorStore->getUnknownActor();
84 LoggerFactory::getInstance(
'logentry' )->warning(
85 'Failed to instantiate RC log entry performer', [
87 'log_id' => $this->
getId()
91 } elseif ( isset( $this->row->rc_user ) ) {
92 $this->performer = $userFactory->newFromId( $this->row->rc_user )->getUser();
93 } elseif ( isset( $this->row->rc_user_text ) ) {
94 $user = $userFactory->newFromName( $this->row->rc_user_text );
96 $this->performer = $user->getUser();
98 $this->performer = $actorStore->getUnknownActor();
99 LoggerFactory::getInstance(
'logentry' )->warning(
100 'Failed to instantiate RC log entry performer', [
101 'rc_user_text' => $this->row->rc_user_text,
102 'log_id' => $this->getId()
113 $namespace = $this->row->rc_namespace;
114 $page = $this->row->rc_title;
120 return wfTimestamp( TS::MW, $this->row->rc_timestamp );
127 return $services->getCommentStore()
130 $services->getConnectionProvider()->getReplicaDatabase(),
138 return $this->row->rc_deleted;
143class_alias( RCDatabaseLogEntry::class,
'RCDatabaseLogEntry' );
wfTimestamp( $outputtype=TS::UNIX, $ts=0)
Get a timestamp string in one of various formats.
if(!defined('MW_SETUP_CALLBACK'))
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