dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add GENDER support to protection null revision edit summary"
[lhc/web/wiklou.git]
/
includes
/
EventRelayerGroup.php
diff --git
a/includes/EventRelayerGroup.php
b/includes/EventRelayerGroup.php
index
3af756d
..
9360693
100644
(file)
--- a/
includes/EventRelayerGroup.php
+++ b/
includes/EventRelayerGroup.php
@@
-1,4
+1,6
@@
<?php
<?php
+use MediaWiki\MediaWikiServices;
+
/**
* Factory class for spawning EventRelayer objects using configuration
*
/**
* Factory class for spawning EventRelayer objects using configuration
*
@@
-7,30
+9,24
@@
*/
class EventRelayerGroup {
/** @var array[] */
*/
class EventRelayerGroup {
/** @var array[] */
- protected $configByChannel =
array()
;
+ protected $configByChannel =
[]
;
/** @var EventRelayer[] */
/** @var EventRelayer[] */
- protected $relayers = array();
-
- /** @var EventRelayerGroup */
- protected static $instance = null;
+ protected $relayers = [];
/**
/**
- * @param
Config $config
+ * @param
array[] $config Channel configuration
*/
*/
- p
rotected function __construct( Config
$config ) {
- $this->configByChannel = $config
->get( 'EventRelayerConfig' )
;
+ p
ublic function __construct( array
$config ) {
+ $this->configByChannel = $config;
}
/**
}
/**
+ * @deprecated since 1.27 Use MediaWikiServices::getInstance()->getEventRelayerGroup()
* @return EventRelayerGroup
*/
public static function singleton() {
* @return EventRelayerGroup
*/
public static function singleton() {
- if ( !self::$instance ) {
- self::$instance = new self( RequestContext::getMain()->getConfig() );
- }
-
- return self::$instance;
+ return MediaWikiServices::getInstance()->getEventRelayerGroup();
}
/**
}
/**