From b7546e0d6bfec631e17766045d907ebfb2dfdbd4 Mon Sep 17 00:00:00 2001 From: diosmosis <benaka@piwik.pro> Date: Thu, 21 May 2015 06:37:08 -0700 Subject: [PATCH] Remove EventManager::getPluginManager() method, it is no longer needed since the Plugin\Manager is provided through DI. --- core/EventDispatcher.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/core/EventDispatcher.php b/core/EventDispatcher.php index 55b83e4d1d..d9c6b0374c 100644 --- a/core/EventDispatcher.php +++ b/core/EventDispatcher.php @@ -92,7 +92,7 @@ class EventDispatcher $this->pendingEvents[] = array($eventName, $params); } - $manager = $this->getPluginManager(); + $manager = $this->pluginManager; if (empty($plugins)) { $plugins = $manager->getPluginsLoadedAndActivated(); @@ -201,18 +201,4 @@ class EventDispatcher return array($pluginFunction, $callbackGroup); } - - /** - * Returns the Plugin\Manager instance used by the event dispatcher. - * - * @return Plugin\Manager - */ - private function getPluginManager() - { - if ($this->pluginManager === null) { - return Plugin\Manager::getInstance(); // caching the var breaks DI for now since only Plugin\Manager is in the container. - } else { - return $this->pluginManager; - } - } } \ No newline at end of file -- GitLab