MediaWiki master
MediaWiki\RecentChanges\RecentChangeFactory Interface Reference

Inherited by MediaWiki\RecentChanges\RecentChangeStore.

Public Member Functions

 createCategorizationRecentChange (string $timestamp, PageIdentity $categoryTitle, ?UserIdentity $user, string $comment, PageIdentity $pageTitle, int $oldRevId, int $newRevId, bool $bot, string $ip='', int $deleted=0, ?bool $added=null, bool $forImport=false)
 Create a RecentChange for a category membership change.
 
 createEditRecentChange (string $timestamp, PageIdentity $page, bool $minor, UserIdentity $user, string $comment, int $oldId, bool $bot, string $ip='', ?int $oldSize=0, ?int $newSize=0, int $newId=0, int $patrol=0, array $tags=[], ?EditResult $editResult=null)
 Create a RecentChange for an edit.
 
 createLogRecentChange (string $timestamp, PageReference $logPage, UserIdentity $user, string $actionComment, string $ip, string $type, string $action, PageReference $target, string $logComment, string $params, int $newId=0, string $actionCommentIRC='', int $revId=0, bool $isPatrollable=false, ?bool $forceBotFlag=null, int $deleted=0)
 Create a RecentChange for a log entry.
 
 createNewPageRecentChange (string $timestamp, PageIdentity $page, bool $minor, UserIdentity $user, string $comment, bool $bot, string $ip='', ?int $size=0, int $newId=0, int $patrol=0, array $tags=[])
 Create a RecentChange for a new page.
 
 insertRecentChange (RecentChange $recentChange, bool $send=self::SEND_FEED)
 Insert a recent change into the database.
 
 newRecentChangeFromRow ( $row)
 Create a new RecentChange object from a database row.
 

Detailed Description

Since
1.45

Definition at line 18 of file RecentChangeFactory.php.

Member Function Documentation

◆ createCategorizationRecentChange()

MediaWiki\RecentChanges\RecentChangeFactory::createCategorizationRecentChange ( string $timestamp,
PageIdentity $categoryTitle,
?UserIdentity $user,
string $comment,
PageIdentity $pageTitle,
int $oldRevId,
int $newRevId,
bool $bot,
string $ip = '',
int $deleted = 0,
?bool $added = null,
bool $forImport = false )

Create a RecentChange for a category membership change.

Parameters
string$timestampTimestamp of the recent change to occur
PageIdentity$categoryTitlethe category a page is being added to or removed from
UserIdentity | null$userUser object of the user that made the change
string$commentChange summary
PageIdentity$pageTitlethe page that is being added or removed
int$oldRevIdParent revision ID of this change
int$newRevIdRevision ID of this change
bool$bottrue, if the change was made by a bot
string$ipIP address of the user, if the change was made anonymously
int$deletedIndicates whether the change has been deleted
bool | null$addedtrue, if the category was added, false for removed
bool$forImportWhether the associated revision was imported
Returns
RecentChange

Implemented in MediaWiki\RecentChanges\RecentChangeStore.

◆ createEditRecentChange()

MediaWiki\RecentChanges\RecentChangeFactory::createEditRecentChange ( string $timestamp,
PageIdentity $page,
bool $minor,
UserIdentity $user,
string $comment,
int $oldId,
bool $bot,
string $ip = '',
?int $oldSize = 0,
?int $newSize = 0,
int $newId = 0,
int $patrol = 0,
array $tags = [],
?EditResult $editResult = null )

Create a RecentChange for an edit.

Parameters
string$timestampTimestamp of the edit to occur
PageIdentity$pagePage of the edit to occur
bool$minorWhether the edit is minor
UserIdentity$userUser who made the edit
string$commentSummary of the edit
int$oldIdID of the previous revision
bool$botWhether the edit was made by a bot
string$ipIP address of the user, if the edit was made anonymously
int | null$oldSizeSize of the previous revision
int | null$newSizeSize of the new revision
int$newIdID of the new revision
int$patrolWhether the edit was patrolled (PRC_UNPATROLLED, PRC_PATROLLED, PRC_AUTOPATROLLED)
string[]$tags
EditResult | null$editResultEditResult associated with this edit. Can be safely skipped if the edit is not a revert. Used only for marking revert tags.
Returns
RecentChange

Implemented in MediaWiki\RecentChanges\RecentChangeStore.

◆ createLogRecentChange()

MediaWiki\RecentChanges\RecentChangeFactory::createLogRecentChange ( string $timestamp,
PageReference $logPage,
UserIdentity $user,
string $actionComment,
string $ip,
string $type,
string $action,
PageReference $target,
string $logComment,
string $params,
int $newId = 0,
string $actionCommentIRC = '',
int $revId = 0,
bool $isPatrollable = false,
?bool $forceBotFlag = null,
int $deleted = 0 )

Create a RecentChange for a log entry.

Parameters
string$timestampTimestamp of the log entry to occur
PageReference$logPage
UserIdentity$userUser who performed the log action
string$actionCommentSummary of the log action
string$ipIP address of the user, if the log action was made anonymously
string$typeLog type
string$actionLog action
PageReference$targetTarget of the log action
string$logComment
string$params
int$newId
string$actionCommentIRCIRC comment of the log action
int$revIdId of associated revision, if any
bool$isPatrollableWhether this log entry is patrollable
bool | null$forceBotFlagOverride the default behavior and set bot flag to the value of the argument. When omitted or null, it falls back to the global state.
int$deleted
Returns
RecentChange

Implemented in MediaWiki\RecentChanges\RecentChangeStore.

◆ createNewPageRecentChange()

MediaWiki\RecentChanges\RecentChangeFactory::createNewPageRecentChange ( string $timestamp,
PageIdentity $page,
bool $minor,
UserIdentity $user,
string $comment,
bool $bot,
string $ip = '',
?int $size = 0,
int $newId = 0,
int $patrol = 0,
array $tags = [] )

Create a RecentChange for a new page.

Parameters
string$timestampTimestamp of the page creation to occur
PageIdentity$pagecreated page
bool$minorWhether the page creation is minor
UserIdentity$userUser who made the page creation
string$commentSummary of the page creation
bool$botWhether the page creation was made by a bot
string$ipIP address of the user, if the page creation was made anonymously
int | null$sizeSize of the new revision
int$newIdID of the new revision
int$patrolWhether the edit was patrolled (PRC_UNPATROLLED, PRC_PATROLLED, PRC_AUTOPATROLLED)
string[]$tags
Returns
RecentChange

Implemented in MediaWiki\RecentChanges\RecentChangeStore.

◆ insertRecentChange()

MediaWiki\RecentChanges\RecentChangeFactory::insertRecentChange ( RecentChange $recentChange,
bool $send = self::SEND_FEED )

Insert a recent change into the database.

For compatibility reasons, the SEND_ constants internally reference a value that may seem negated from their purpose (none=true, feed=false). This is because the parameter used to be called "$noudp", defaulting to false.

Parameters
RecentChange$recentChange
bool$sendself::SEND_FEED or self::SEND_NONE

Implemented in MediaWiki\RecentChanges\RecentChangeStore.

◆ newRecentChangeFromRow()

MediaWiki\RecentChanges\RecentChangeFactory::newRecentChangeFromRow ( $row)

Create a new RecentChange object from a database row.

Parameters
stdClass$rowDatabase row from recentchanges table
Returns
RecentChange

Implemented in MediaWiki\RecentChanges\RecentChangeStore.


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