Article::getAutosummary() and WikiPage::getAutosummary() were removed
[lhc/web/wiklou.git] / includes / EventRelayerGroup.php
index 3af756d..9360693 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+use MediaWiki\MediaWikiServices;
+
 /**
  * Factory class for spawning EventRelayer objects using configuration
  *
@@ -7,30 +9,24 @@
  */
 class EventRelayerGroup {
        /** @var array[] */
-       protected $configByChannel = array();
+       protected $configByChannel = [];
 
        /** @var EventRelayer[] */
-       protected $relayers = array();
-
-       /** @var EventRelayerGroup */
-       protected static $instance = null;
+       protected $relayers = [];
 
        /**
-        * @param Config $config
+        * @param array[] $config Channel configuration
         */
-       protected function __construct( Config $config ) {
-               $this->configByChannel = $config->get( 'EventRelayerConfig' );
+       public function __construct( array $config ) {
+               $this->configByChannel = $config;
        }
 
        /**
+        * @deprecated since 1.27 Use MediaWikiServices::getInstance()->getEventRelayerGroup()
         * @return EventRelayerGroup
         */
        public static function singleton() {
-               if ( !self::$instance ) {
-                       self::$instance = new self( RequestContext::getMain()->getConfig() );
-               }
-
-               return self::$instance;
+               return MediaWikiServices::getInstance()->getEventRelayerGroup();
        }
 
        /**