diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-23 17:05:44 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2013-10-24 08:13:06 +0400 |
commit | 0cb0472b6d6e90b2c4bb7d086145c9d553ffdf86 (patch) | |
tree | 534fd57698e3861134e4dc843de6999728db195a /core/Plugin/API.php | |
parent | fdb2cbaa5420d292b9ce6fff37ae1607770c9794 (diff) |
Refs #4200 started documenting LogAggregator and documented Plugin/API.
Diffstat (limited to 'core/Plugin/API.php')
-rw-r--r-- | core/Plugin/API.php | 22 |
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 |