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:
authordiosmosis <benakamoorthi@fastmail.fm>2013-10-23 17:05:44 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2013-10-24 08:13:06 +0400
commit0cb0472b6d6e90b2c4bb7d086145c9d553ffdf86 (patch)
tree534fd57698e3861134e4dc843de6999728db195a /core/Plugin/API.php
parentfdb2cbaa5420d292b9ce6fff37ae1607770c9794 (diff)
Refs #4200 started documenting LogAggregator and documented Plugin/API.
Diffstat (limited to 'core/Plugin/API.php')
-rw-r--r--core/Plugin/API.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/core/Plugin/API.php b/core/Plugin/API.php
index bb7e67cd7e..436f13a32c 100644
--- a/core/Plugin/API.php
+++ b/core/Plugin/API.php
@@ -13,7 +13,27 @@ namespace Piwik\Plugin;
use Piwik\Singleton;
+/**
+ * The base class of all API singletons.
+ *
+ * Plugins that want to expose functionality through an API should create a class
+ * that derives from this one. Every public method in that class will be callable
+ * through Piwik's API.
+ *
+ * ### Example
+ *
+ * class MyAPI extends API
+ * {
+ * public function myMethod($idSite, $period, $date, $segment = false)
+ * {
+ * $dataTable = // ... get some data ...
+ * return $dataTable;
+ * }
+ * }
+ *
+ * @api
+ */
abstract class API extends Singleton
{
-}
+} \ No newline at end of file