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:
authormattab <matthieu.aubry@gmail.com>2013-10-10 08:52:46 +0400
committermattab <matthieu.aubry@gmail.com>2013-10-11 00:15:03 +0400
commitc782b8ccd740a206bf2b7af393dcade94a38ef7d (patch)
tree1c9d40a922785b2aa279857a1520a6eb6781bdb7 /core/EventDispatcher.php
parenta4972f38678207e649a20f1b5ac281a679bf92fa (diff)
Refs #4208 refactor all singletons except the hard ones (with custom getInstance()
(some tests failing)
Diffstat (limited to 'core/EventDispatcher.php')
-rw-r--r--core/EventDispatcher.php18
1 files changed, 1 insertions, 17 deletions
diff --git a/core/EventDispatcher.php b/core/EventDispatcher.php
index 66cef418ef..c57cea990e 100644
--- a/core/EventDispatcher.php
+++ b/core/EventDispatcher.php
@@ -17,7 +17,7 @@ use Piwik\Plugin;
* This class allows code to post events from anywhere in Piwik and for
* plugins to associate callbacks to be executed when events are posted.
*/
-class EventDispatcher
+class EventDispatcher extends Singleton
{
// implementation details for postEvent
const EVENT_CALLBACK_GROUP_FIRST = 0;
@@ -25,22 +25,6 @@ class EventDispatcher
const EVENT_CALLBACK_GROUP_THIRD = 2;
/**
- * Singleton instance.
- */
- private static $instance = null;
-
- /**
- * Returns the singleton EventDispatcher instance. Creates it if necessary.
- */
- public static function getInstance()
- {
- if (self::$instance === null) {
- self::$instance = new EventDispatcher();
- }
- return self::$instance;
- }
-
- /**
* Array of observers (callbacks attached to events) that are not methods
* of plugin classes.
*