MediaWiki  1.34.0
MovePageFactory.php
Go to the documentation of this file.
1 <?php
2 
22 namespace MediaWiki\Page;
23 
26 use MovePage;
27 use NamespaceInfo;
28 use RepoGroup;
29 use Title;
32 
38  private $options;
39 
41  private $loadBalancer;
42 
44  private $nsInfo;
45 
47  private $watchedItems;
48 
50  private $permMgr;
51 
53  private $repoGroup;
54 
59  public static $constructorOptions = [
60  'CategoryCollation',
61  'ContentHandlerUseDB',
62  ];
63 
64  public function __construct(
71  ) {
72  $options->assertRequiredOptions( self::$constructorOptions );
73 
74  $this->options = $options;
75  $this->loadBalancer = $loadBalancer;
76  $this->nsInfo = $nsInfo;
77  $this->watchedItems = $watchedItems;
78  $this->permMgr = $permMgr;
79  $this->repoGroup = $repoGroup;
80  }
81 
87  public function newMovePage( Title $from, Title $to ) : MovePage {
88  return new MovePage( $from, $to, $this->options, $this->loadBalancer, $this->nsInfo,
89  $this->watchedItems, $this->permMgr, $this->repoGroup );
90  }
91 }
MediaWiki\Page\MovePageFactory\$nsInfo
NamespaceInfo $nsInfo
Definition: MovePageFactory.php:44
MediaWiki\Page\MovePageFactory\$loadBalancer
ILoadBalancer $loadBalancer
Definition: MovePageFactory.php:41
MediaWiki\Page\MovePageFactory\$watchedItems
WatchedItemStoreInterface $watchedItems
Definition: MovePageFactory.php:47
MediaWiki\Page\MovePageFactory\$repoGroup
RepoGroup $repoGroup
Definition: MovePageFactory.php:53
MediaWiki\Config\ServiceOptions
A class for passing options to services.
Definition: ServiceOptions.php:25
MovePage
Handles the backend logic of moving a page from one title to another.
Definition: MovePage.php:36
MediaWiki\Page\MovePageFactory
Definition: MovePageFactory.php:36
MediaWiki\Page\MovePageFactory\__construct
__construct(ServiceOptions $options, ILoadBalancer $loadBalancer, NamespaceInfo $nsInfo, WatchedItemStoreInterface $watchedItems, PermissionManager $permMgr, RepoGroup $repoGroup)
Definition: MovePageFactory.php:64
MediaWiki\Permissions\PermissionManager
A service class for checking permissions To obtain an instance, use MediaWikiServices::getInstance()-...
Definition: PermissionManager.php:47
MediaWiki\Page\MovePageFactory\$options
ServiceOptions $options
Definition: MovePageFactory.php:38
MediaWiki\Page\MovePageFactory\$permMgr
PermissionManager $permMgr
Definition: MovePageFactory.php:50
Title
Represents a title within MediaWiki.
Definition: Title.php:42
MediaWiki\Page\MovePageFactory\$constructorOptions
static array $constructorOptions
Definition: MovePageFactory.php:59
RepoGroup
Prioritized list of file repositories.
Definition: RepoGroup.php:31
MediaWiki\Page
Definition: MovePageFactory.php:22
MediaWiki\Page\MovePageFactory\newMovePage
newMovePage(Title $from, Title $to)
Definition: MovePageFactory.php:87
NamespaceInfo
This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of them ba...
Definition: NamespaceInfo.php:33
WatchedItemStoreInterface
Definition: WatchedItemStoreInterface.php:30
Wikimedia\Rdbms\ILoadBalancer
Database cluster connection, tracking, load balancing, and transaction manager interface.
Definition: ILoadBalancer.php:81
MediaWiki\Config\ServiceOptions\assertRequiredOptions
assertRequiredOptions(array $expectedKeys)
Assert that the list of options provided in this instance exactly match $expectedKeys,...
Definition: ServiceOptions.php:62