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-07-21 12:01:35 +0400
committermattab <matthieu.aubry@gmail.com>2013-07-21 12:01:36 +0400
commitaca8ec33a85e0a70b818b6227145041717d7a69e (patch)
tree41377e3a9737d63222522ef93ecf8483f3faddfa /plugins/ExampleUI
parent0a63210e3eae7562af1a3dbee340eb1ee140db3d (diff)
Refs #4059 Work in progress: Conversion to use Namespaces: Period*, Metrics, Segment, SegmentExpression, PluginsManager.
Removed some deprecated code.
Diffstat (limited to 'plugins/ExampleUI')
-rw-r--r--plugins/ExampleUI/API.php11
-rw-r--r--plugins/ExampleUI/ExampleUI.php3
2 files changed, 8 insertions, 6 deletions
diff --git a/plugins/ExampleUI/API.php b/plugins/ExampleUI/API.php
index 87bc64a88c..5857ef112b 100644
--- a/plugins/ExampleUI/API.php
+++ b/plugins/ExampleUI/API.php
@@ -8,7 +8,8 @@
* @category Piwik_Plugins
* @package Piwik_ExampleUI
*/
-use Piwik\Period_Range;
+use Piwik\Period\Range;
+use Piwik\DataTable;
/**
* ExampleUI API is also an example API useful if you are developing a Piwik plugin.
@@ -32,7 +33,7 @@ class Piwik_ExampleUI_API
public function getTemperaturesEvolution($date, $period)
{
- $period = new Period_Range($period, 'last30');
+ $period = new Range($period, 'last30');
$dateStart = $period->getDateStart()->toString('Y-m-d'); // eg. "2009-04-01"
$dateEnd = $period->getDateEnd()->toString('Y-m-d'); // eg. "2009-04-30"
@@ -51,7 +52,7 @@ class Piwik_ExampleUI_API
$value = array('server1' => $server1, 'server2' => $server2);
$temperatures[$subPeriod->getLocalizedShortString()] = $value;
}
- return Piwik_DataTable::makeFromIndexedArray($temperatures);
+ return DataTable::makeFromIndexedArray($temperatures);
}
// we generate an array of random server temperatures
@@ -68,7 +69,7 @@ class Piwik_ExampleUI_API
$temperatures[$xAxisLabel] = $temperatureValues[$i];
}
- return Piwik_DataTable::makeFromIndexedArray($temperatures);
+ return DataTable::makeFromIndexedArray($temperatures);
}
public function getPlanetRatios()
@@ -84,7 +85,7 @@ class Piwik_ExampleUI_API
'Neptune' => 3.883,
);
// convert this array to a DataTable object
- return Piwik_DataTable::makeFromIndexedArray($planetRatios);
+ return DataTable::makeFromIndexedArray($planetRatios);
}
public function getPlanetRatiosWithLogos()
diff --git a/plugins/ExampleUI/ExampleUI.php b/plugins/ExampleUI/ExampleUI.php
index 6808be9109..4e1210cf14 100644
--- a/plugins/ExampleUI/ExampleUI.php
+++ b/plugins/ExampleUI/ExampleUI.php
@@ -18,12 +18,13 @@
- without all columns icon
+ update http://piwik.org/participate/user-interface
*/
+use Piwik\Plugin;
/**
*
* @package Piwik_ExampleUI
*/
-class Piwik_ExampleUI extends Piwik_Plugin
+class Piwik_ExampleUI extends Plugin
{
/**
* @see Piwik_Plugin::getListHooksRegistered