MediaWiki REL1_40
LockManagerGroupFactory.php
Go to the documentation of this file.
1<?php
2
4
6
12 private $defaultDomain;
13
15 private $lockManagerConfigs;
16
18 private $instances = [];
19
26 public function __construct( $defaultDomain, array $lockManagerConfigs ) {
27 $this->defaultDomain = $defaultDomain;
28 $this->lockManagerConfigs = $lockManagerConfigs;
29 }
30
36 public function getLockManagerGroup( $domain = false ): LockManagerGroup {
37 if ( $domain === false || $domain === null ) {
38 $domain = $this->defaultDomain;
39 }
40
41 if ( !isset( $this->instances[$domain] ) ) {
42 $this->instances[$domain] =
43 new LockManagerGroup( $domain, $this->lockManagerConfigs );
44 }
45
46 return $this->instances[$domain];
47 }
48}
if(!defined('MW_SETUP_CALLBACK'))
The persistent session ID (if any) loaded at startup.
Definition WebStart.php:88
Class to handle file lock manager registration.
__construct( $defaultDomain, array $lockManagerConfigs)
Do not call directly, use MediaWikiServices.