MediaWiki  master
MediaWiki\Storage\PageUpdaterFactory Class Reference

A factory for PageUpdater instances. More...

Collaboration diagram for MediaWiki\Storage\PageUpdaterFactory:

Public Member Functions

 __construct (RevisionStore $revisionStore, RevisionRenderer $revisionRenderer, SlotRoleRegistry $slotRoleRegistry, ParserCache $parserCache, JobQueueGroup $jobQueueGroup, MessageCache $messageCache, Language $contLang, ILBFactory $loadbalancerFactory, IContentHandlerFactory $contentHandlerFactory, HookContainer $hookContainer, EditResultCache $editResultCache, UserNameUtils $userNameUtils, LoggerInterface $logger, ServiceOptions $options, UserEditTracker $userEditTracker, UserGroupManager $userGroupManager, TitleFormatter $titleFormatter, ContentTransformer $contentTransformer, PageEditStash $pageEditStash, TalkPageNotificationManager $talkPageNotificationManager, WANObjectCache $mainWANObjectCache, PermissionManager $permissionManager, array $softwareTags)
 
 newDerivedPageDataUpdater (WikiPage $page)
 
 newPageUpdater (WikiPage $page, UserIdentity $user)
 Return a PageUpdater for building an update to a page. More...
 
 newPageUpdaterForDerivedPageDataUpdater (WikiPage $page, UserIdentity $user, DerivedPageDataUpdater $derivedPageDataUpdater)
 Return a PageUpdater for building an update to a page, reusing the state of an existing DerivedPageDataUpdater. More...
 

Public Attributes

const CONSTRUCTOR_OPTIONS
 Options that have to be present in the ServiceOptions object passed to the constructor. More...
 

Private Attributes

IContentHandlerFactory $contentHandlerFactory
 
ContentTransformer $contentTransformer
 
Language $contLang
 
EditResultCache $editResultCache
 
HookContainer $hookContainer
 
JobQueueGroup $jobQueueGroup
 
ILBFactory $loadbalancerFactory
 
LoggerInterface $logger
 
WANObjectCache $mainWANObjectCache
 
MessageCache $messageCache
 
ServiceOptions $options
 
PageEditStash $pageEditStash
 
ParserCache $parserCache
 
PermissionManager $permissionManager
 
RevisionRenderer $revisionRenderer
 
RevisionStore $revisionStore
 
SlotRoleRegistry $slotRoleRegistry
 
string[] $softwareTags
 
TalkPageNotificationManager $talkPageNotificationManager
 
TitleFormatter $titleFormatter
 
UserEditTracker $userEditTracker
 
UserGroupManager $userGroupManager
 
UserNameUtils $userNameUtils
 

Detailed Description

A factory for PageUpdater instances.

Since
1.37

Definition at line 54 of file PageUpdaterFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Storage\PageUpdaterFactory::__construct ( RevisionStore  $revisionStore,
RevisionRenderer  $revisionRenderer,
SlotRoleRegistry  $slotRoleRegistry,
ParserCache  $parserCache,
JobQueueGroup  $jobQueueGroup,
MessageCache  $messageCache,
Language  $contLang,
ILBFactory  $loadbalancerFactory,
IContentHandlerFactory  $contentHandlerFactory,
HookContainer  $hookContainer,
EditResultCache  $editResultCache,
UserNameUtils  $userNameUtils,
LoggerInterface  $logger,
ServiceOptions  $options,
UserEditTracker  $userEditTracker,
UserGroupManager  $userGroupManager,
TitleFormatter  $titleFormatter,
ContentTransformer  $contentTransformer,
PageEditStash  $pageEditStash,
TalkPageNotificationManager  $talkPageNotificationManager,
WANObjectCache  $mainWANObjectCache,
PermissionManager  $permissionManager,
array  $softwareTags 
)
Parameters
RevisionStore$revisionStore
RevisionRenderer$revisionRenderer
SlotRoleRegistry$slotRoleRegistry
ParserCache$parserCache
JobQueueGroup$jobQueueGroup
MessageCache$messageCache
Language$contLang
ILBFactory$loadbalancerFactory
IContentHandlerFactory$contentHandlerFactory
HookContainer$hookContainer
EditResultCache$editResultCache
UserNameUtils$userNameUtils
LoggerInterface$logger
ServiceOptions$options
UserEditTracker$userEditTracker
UserGroupManager$userGroupManager
TitleFormatter$titleFormatter
ContentTransformer$contentTransformer
PageEditStash$pageEditStash
TalkPageNotificationManager$talkPageNotificationManager
WANObjectCache$mainWANObjectCache
PermissionManager$permissionManager
string[]$softwareTags

Definition at line 164 of file PageUpdaterFactory.php.

References MediaWiki\Storage\PageUpdaterFactory\$contentHandlerFactory, MediaWiki\Storage\PageUpdaterFactory\$contentTransformer, MediaWiki\Storage\PageUpdaterFactory\$contLang, MediaWiki\Storage\PageUpdaterFactory\$editResultCache, MediaWiki\Storage\PageUpdaterFactory\$hookContainer, MediaWiki\Storage\PageUpdaterFactory\$jobQueueGroup, MediaWiki\Storage\PageUpdaterFactory\$loadbalancerFactory, MediaWiki\Storage\PageUpdaterFactory\$logger, MediaWiki\Storage\PageUpdaterFactory\$mainWANObjectCache, MediaWiki\Storage\PageUpdaterFactory\$messageCache, MediaWiki\Storage\PageUpdaterFactory\$options, MediaWiki\Storage\PageUpdaterFactory\$pageEditStash, MediaWiki\Storage\PageUpdaterFactory\$parserCache, MediaWiki\Storage\PageUpdaterFactory\$permissionManager, MediaWiki\Storage\PageUpdaterFactory\$revisionRenderer, MediaWiki\Storage\PageUpdaterFactory\$revisionStore, MediaWiki\Storage\PageUpdaterFactory\$slotRoleRegistry, MediaWiki\Storage\PageUpdaterFactory\$softwareTags, MediaWiki\Storage\PageUpdaterFactory\$talkPageNotificationManager, MediaWiki\Storage\PageUpdaterFactory\$titleFormatter, MediaWiki\Storage\PageUpdaterFactory\$userEditTracker, MediaWiki\Storage\PageUpdaterFactory\$userGroupManager, MediaWiki\Storage\PageUpdaterFactory\$userNameUtils, and MediaWiki\Config\ServiceOptions\assertRequiredOptions().

Member Function Documentation

◆ newDerivedPageDataUpdater()

MediaWiki\Storage\PageUpdaterFactory::newDerivedPageDataUpdater ( WikiPage  $page)
Parameters
WikiPage$page
Returns
DerivedPageDataUpdater
Access: internal
Needed by WikiPage to back the deprecated prepareContentForEdit() method.
Note
Avoid direct usage of DerivedPageDataUpdater.
See also
docs/pageupdater.md for more information.

Definition at line 294 of file PageUpdaterFactory.php.

Referenced by MediaWiki\Storage\PageUpdaterFactory\newPageUpdater().

◆ newPageUpdater()

MediaWiki\Storage\PageUpdaterFactory::newPageUpdater ( WikiPage  $page,
UserIdentity  $user 
)

Return a PageUpdater for building an update to a page.

Access: internal
For now, most code should keep using WikiPage::newPageUpdater() instead.
Note
We can only start using this method everywhere when WikiPage::prepareContentForEdit() and WikiPage::getCurrentUpdate() have been removed. For now, the WikiPage instance is used to make the state of an ongoing edit available to hook handlers.
Parameters
WikiPage$page
UserIdentity$user
Returns
PageUpdater
Since
1.37

Definition at line 230 of file PageUpdaterFactory.php.

References MediaWiki\Storage\PageUpdaterFactory\newDerivedPageDataUpdater(), and MediaWiki\Storage\PageUpdaterFactory\newPageUpdaterForDerivedPageDataUpdater().

◆ newPageUpdaterForDerivedPageDataUpdater()

MediaWiki\Storage\PageUpdaterFactory::newPageUpdaterForDerivedPageDataUpdater ( WikiPage  $page,
UserIdentity  $user,
DerivedPageDataUpdater  $derivedPageDataUpdater 
)

Return a PageUpdater for building an update to a page, reusing the state of an existing DerivedPageDataUpdater.

Parameters
WikiPage$page
UserIdentity$user
DerivedPageDataUpdater$derivedPageDataUpdater
Returns
PageUpdater
Access: internal
needed by WikiPage to back the WikiPage::newPageUpdater method.
Since
1.37

Definition at line 254 of file PageUpdaterFactory.php.

References MediaWiki\Storage\PageUpdater\CONSTRUCTOR_OPTIONS.

Referenced by MediaWiki\Storage\PageUpdaterFactory\newPageUpdater().

Member Data Documentation

◆ $contentHandlerFactory

IContentHandlerFactory MediaWiki\Storage\PageUpdaterFactory::$contentHandlerFactory
private

◆ $contentTransformer

ContentTransformer MediaWiki\Storage\PageUpdaterFactory::$contentTransformer
private

◆ $contLang

Language MediaWiki\Storage\PageUpdaterFactory::$contLang
private

◆ $editResultCache

EditResultCache MediaWiki\Storage\PageUpdaterFactory::$editResultCache
private

◆ $hookContainer

HookContainer MediaWiki\Storage\PageUpdaterFactory::$hookContainer
private

◆ $jobQueueGroup

JobQueueGroup MediaWiki\Storage\PageUpdaterFactory::$jobQueueGroup
private

◆ $loadbalancerFactory

ILBFactory MediaWiki\Storage\PageUpdaterFactory::$loadbalancerFactory
private

◆ $logger

LoggerInterface MediaWiki\Storage\PageUpdaterFactory::$logger
private

◆ $mainWANObjectCache

WANObjectCache MediaWiki\Storage\PageUpdaterFactory::$mainWANObjectCache
private

◆ $messageCache

MessageCache MediaWiki\Storage\PageUpdaterFactory::$messageCache
private

◆ $options

ServiceOptions MediaWiki\Storage\PageUpdaterFactory::$options
private

◆ $pageEditStash

PageEditStash MediaWiki\Storage\PageUpdaterFactory::$pageEditStash
private

◆ $parserCache

ParserCache MediaWiki\Storage\PageUpdaterFactory::$parserCache
private

◆ $permissionManager

PermissionManager MediaWiki\Storage\PageUpdaterFactory::$permissionManager
private

◆ $revisionRenderer

RevisionRenderer MediaWiki\Storage\PageUpdaterFactory::$revisionRenderer
private

◆ $revisionStore

RevisionStore MediaWiki\Storage\PageUpdaterFactory::$revisionStore
private

◆ $slotRoleRegistry

SlotRoleRegistry MediaWiki\Storage\PageUpdaterFactory::$slotRoleRegistry
private

◆ $softwareTags

string [] MediaWiki\Storage\PageUpdaterFactory::$softwareTags
private

◆ $talkPageNotificationManager

TalkPageNotificationManager MediaWiki\Storage\PageUpdaterFactory::$talkPageNotificationManager
private

◆ $titleFormatter

TitleFormatter MediaWiki\Storage\PageUpdaterFactory::$titleFormatter
private

◆ $userEditTracker

UserEditTracker MediaWiki\Storage\PageUpdaterFactory::$userEditTracker
private

◆ $userGroupManager

UserGroupManager MediaWiki\Storage\PageUpdaterFactory::$userGroupManager
private

◆ $userNameUtils

UserNameUtils MediaWiki\Storage\PageUpdaterFactory::$userNameUtils
private

◆ CONSTRUCTOR_OPTIONS

const MediaWiki\Storage\PageUpdaterFactory::CONSTRUCTOR_OPTIONS
Initial value:
= [
'ArticleCountMethod',
'RCWatchCategoryMembership',
'PageCreationLog',
'UseAutomaticEditSummaries',
'ManualRevertSearchRadius',
'UseRCPatrol',
]

Options that have to be present in the ServiceOptions object passed to the constructor.

Note
must include PageUpdater::CONSTRUCTOR_OPTIONS
Access: internal

Definition at line 61 of file PageUpdaterFactory.php.


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