blob: 1f5f9d7609c1c8561baa534fb4d56bf75443e810 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
*/
namespace Piwik\Plugins\DBStats;
use Piwik\Piwik;
use Piwik\Plugins\CoreVisualizations\Visualizations\Graph;
use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
class DBStats extends \Piwik\Plugin
{
const TIME_OF_LAST_TASK_RUN_OPTION = 'dbstats_time_of_last_cache_task_run';
/**
* @see Piwik\Plugin::getListHooksRegistered
*/
public function getListHooksRegistered()
{
return array(
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
"TestingEnvironment.addHooks" => 'setupTestEnvironment'
);
}
public function getStylesheetFiles(&$stylesheets)
{
$stylesheets[] = "plugins/DBStats/stylesheets/dbStatsTable.less";
}
public function setupTestEnvironment($environment)
{
Piwik::addAction("MySQLMetadataProvider.createDao", function (&$dao) {
require_once dirname(__FILE__) . "/tests/Mocks/MockDataAccess.php";
$dao = new Mocks\MockDataAccess();
});
}
}
|