diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-10-10 08:52:46 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-10-11 00:15:03 +0400 |
commit | c782b8ccd740a206bf2b7af393dcade94a38ef7d (patch) | |
tree | 1c9d40a922785b2aa279857a1520a6eb6781bdb7 /plugins/Dashboard/API.php | |
parent | a4972f38678207e649a20f1b5ac281a679bf92fa (diff) |
Refs #4208 refactor all singletons except the hard ones (with custom getInstance()
(some tests failing)
Diffstat (limited to 'plugins/Dashboard/API.php')
-rw-r--r-- | plugins/Dashboard/API.php | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/plugins/Dashboard/API.php b/plugins/Dashboard/API.php index a6acf6c26a..1841775211 100644 --- a/plugins/Dashboard/API.php +++ b/plugins/Dashboard/API.php @@ -17,33 +17,16 @@ use Piwik\WidgetsList; * * @package Piwik_API */ -class API +class API extends \Piwik\Plugin\API { - /** - * @var \Piwik\Plugins\Dashboard\API - */ - static private $instance = null; - private $dashboard = null; - public function __construct() + protected function __construct() { $this->dashboard = new Dashboard(); } /** - * @return \Piwik\Plugins\Dashboard\API - */ - static public function getInstance() - { - if (null == self::$instance) { - self::$instance = new self; - } - - return self::$instance; - } - - /** * Get each dashboard that belongs to a user including the containing widgets that are placed within each dashboard. * If the user has not created any dashboard yet, the default dashboard will be returned. * |