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:
authorThomas Steur <thomas.steur@googlemail.com>2014-08-06 13:59:37 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-08-06 13:59:37 +0400
commite15509d62039d25f9955108650536cdbeca933d7 (patch)
tree0db207aeb9fe7372f5e932d5f7ed5d3abbc156fb /plugins/ExampleReport
parent3159815ea3e7229fc53729dbd04793b777e62aae (diff)
refs #5926 added missing files
Diffstat (limited to 'plugins/ExampleReport')
-rw-r--r--plugins/ExampleReport/API.php38
-rw-r--r--plugins/ExampleReport/ExampleReport.php13
-rw-r--r--plugins/ExampleReport/plugin.json13
3 files changed, 64 insertions, 0 deletions
diff --git a/plugins/ExampleReport/API.php b/plugins/ExampleReport/API.php
new file mode 100644
index 0000000000..3c7c3866c4
--- /dev/null
+++ b/plugins/ExampleReport/API.php
@@ -0,0 +1,38 @@
+<?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\ExampleReport;
+
+use Piwik\DataTable;
+use Piwik\DataTable\Row;
+
+/**
+ * API for plugin ExampleReport
+ *
+ * @method static \Piwik\Plugins\ExampleReport\API getInstance()
+ */
+class API extends \Piwik\Plugin\API
+{
+
+ /**
+ * Another example method that returns a data table.
+ * @param int $idSite
+ * @param string $period
+ * @param string $date
+ * @param bool|string $segment
+ * @return DataTable
+ */
+ public function getExampleReport($idSite, $period, $date, $segment = false)
+ {
+ $table = new DataTable();
+
+ $table->addRowFromArray(array(Row::COLUMNS => array('nb_visits' => 5)));
+
+ return $table;
+ }
+}
diff --git a/plugins/ExampleReport/ExampleReport.php b/plugins/ExampleReport/ExampleReport.php
new file mode 100644
index 0000000000..b1d2d1c708
--- /dev/null
+++ b/plugins/ExampleReport/ExampleReport.php
@@ -0,0 +1,13 @@
+<?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\ExampleReport;
+
+class ExampleReport extends \Piwik\Plugin
+{
+}
diff --git a/plugins/ExampleReport/plugin.json b/plugins/ExampleReport/plugin.json
new file mode 100644
index 0000000000..92b90becb4
--- /dev/null
+++ b/plugins/ExampleReport/plugin.json
@@ -0,0 +1,13 @@
+{
+ "name": "ExampleReport",
+ "version": "0.1.0",
+ "description": "A plugin that shows how to define a report",
+ "theme": false,
+ "authors": [
+ {
+ "name": "Piwik",
+ "email": "",
+ "homepage": ""
+ }
+ ]
+} \ No newline at end of file