MediaWiki REL1_34
MovePageFactory.php
Go to the documentation of this file.
1<?php
2
23
26use MovePage;
28use RepoGroup;
29use Title;
32
38 private $options;
39
42
44 private $nsInfo;
45
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}
A class for passing options to services.
assertRequiredOptions(array $expectedKeys)
Assert that the list of options provided in this instance exactly match $expectedKeys,...
newMovePage(Title $from, Title $to)
WatchedItemStoreInterface $watchedItems
__construct(ServiceOptions $options, ILoadBalancer $loadBalancer, NamespaceInfo $nsInfo, WatchedItemStoreInterface $watchedItems, PermissionManager $permMgr, RepoGroup $repoGroup)
A service class for checking permissions To obtain an instance, use MediaWikiServices::getInstance()-...
Handles the backend logic of moving a page from one title to another.
Definition MovePage.php:36
This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of them ba...
Prioritized list of file repositories.
Definition RepoGroup.php:31
Represents a title within MediaWiki.
Definition Title.php:42
return[ 'OATHAuth'=> function(MediaWikiServices $services) { return new OATHAuth($services->getMainConfig(), $services->getDBLoadBalancerFactory());}, 'OATHUserRepository'=> function(MediaWikiServices $services) { global $wgOATHAuthDatabase;$auth=$services->getService( 'OATHAuth');return new OATHUserRepository($services->getDBLoadBalancerFactory() ->getMainLB( $wgOATHAuthDatabase), new \HashBagOStuff(['maxKey'=> 5]), $auth);}]
Database cluster connection, tracking, load balancing, and transaction manager interface.