Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benakamoorthi@fastmail.fm>2014-08-25 08:14:13 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2014-08-25 08:14:13 +0400
commit79ecbe5789a093492aca02cbdec370232fc0bda0 (patch)
treed7e1d9498029a1cbd2e05d7ce980478c9e672b46 /core/EventDispatcher.php
parenta8c016e176db0c4f76e01a347e3328b6f3e50639 (diff)
Fixing build error due to previous commit.
Diffstat (limited to 'core/EventDispatcher.php')
-rw-r--r--core/EventDispatcher.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/core/EventDispatcher.php b/core/EventDispatcher.php
index ac6f6d1ef0..ce0815c6ba 100644
--- a/core/EventDispatcher.php
+++ b/core/EventDispatcher.php
@@ -57,10 +57,6 @@ class EventDispatcher extends Singleton
*/
public function __construct($pluginManager = null)
{
- if ($pluginManager === null) {
- $pluginManager = \Piwik\Plugin\Manager::getInstance();
- }
-
$this->pluginManager = $pluginManager;
}
@@ -83,7 +79,7 @@ class EventDispatcher extends Singleton
}
if (empty($plugins)) {
- $plugins = $this->pluginManager->getPluginsLoadedAndActivated();
+ $plugins = $this->getPluginManager()->getPluginsLoadedAndActivated();
}
$callbacks = array();
@@ -91,7 +87,7 @@ class EventDispatcher extends Singleton
// collect all callbacks to execute
foreach ($plugins as $plugin) {
if (is_string($plugin)) {
- $plugin = $this->pluginManager->getLoadedPlugin($plugin);
+ $plugin = $this->getPluginManager()->getLoadedPlugin($plugin);
}
$hooks = $plugin->getListHooksRegistered();
@@ -203,4 +199,15 @@ class EventDispatcher extends Singleton
return array($pluginFunction, $callbackGroup);
}
+
+ /**
+ * TODO
+ */
+ private function getPluginManager()
+ {
+ if ($this->pluginManager === null) {
+ $this->pluginManager = \Piwik\Plugin\Manager::getInstance();
+ }
+ return $this->pluginManager;
+ }
} \ No newline at end of file