28use InvalidArgumentException;
47 throw new LogicException(
'Not implemented!' );
53 throw new LogicException(
'Not implemented!' );
57 return $this->row->rc_logid;
61 return $this->row->rc_params;
65 return $this->row->rc_this_oldid;
69 return $this->row->rc_log_type;
73 return $this->row->rc_log_action;
77 if ( !$this->performer ) {
80 if ( isset( $this->row->rc_actor ) ) {
82 $this->performer = $actorStore->newActorFromRowFields(
83 $this->row->rc_user ?? 0,
84 $this->row->rc_user_text,
87 }
catch ( InvalidArgumentException $e ) {
88 $this->performer = $actorStore->getUnknownActor();
89 LoggerFactory::getInstance(
'logentry' )->warning(
90 'Failed to instantiate RC log entry performer', [
92 'log_id' => $this->
getId()
96 } elseif ( isset( $this->row->rc_user ) ) {
97 $this->performer = $userFactory->newFromId( $this->row->rc_user )->getUser();
98 } elseif ( isset( $this->row->rc_user_text ) ) {
99 $user = $userFactory->newFromName( $this->row->rc_user_text );
101 $this->performer = $user->getUser();
103 $this->performer = $actorStore->getUnknownActor();
104 LoggerFactory::getInstance(
'logentry' )->warning(
105 'Failed to instantiate RC log entry performer', [
106 'rc_user_text' => $this->row->rc_user_text,
107 'log_id' => $this->getId()
117 $namespace = $this->row->rc_namespace;
118 $page = $this->row->rc_title;
119 return Title::makeTitle( $namespace, $page );
123 return wfTimestamp( TS_MW, $this->row->rc_timestamp );
129 return $services->getCommentStore()
132 $services->getConnectionProvider()->getReplicaDatabase(),
139 return $this->row->rc_deleted;
144class_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.
getComment()
Get the user provided comment.
getTarget()
Get the target page of this action.
getRawParameters()
Returns whatever is stored in the database field (typically a serialized associative array but very o...
getDeleted()
Get the access restriction.
getSubtype()
The log subtype.
static newFromId( $id, IReadableDatabase $db)
Loads a LogEntry with the given id from database.
getTimestamp()
Get the timestamp when the action was executed.
getId()
Returns the unique database id.
getType()
The main log type.