diff options
Diffstat (limited to 'plugins/ExampleAPI')
-rw-r--r-- | plugins/ExampleAPI/API.php | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/plugins/ExampleAPI/API.php b/plugins/ExampleAPI/API.php index f0d331c010..d508011d3f 100644 --- a/plugins/ExampleAPI/API.php +++ b/plugins/ExampleAPI/API.php @@ -14,24 +14,35 @@ use Piwik\Piwik; use Piwik\Version; /** - * The ExampleAPI is useful to developers building a custom Piwik plugin. + * The ExampleAPI is useful to developers building a custom Matomo plugin. * * Please see the <a href='https://github.com/piwik/piwik/blob/master/plugins/ExampleAPI/API.php' rel='noreferrer' target='_blank'>source code in in the file plugins/ExampleAPI/API.php</a> for more documentation. * @method static \Piwik\Plugins\ExampleAPI\API getInstance() */ class API extends \Piwik\Plugin\API { + /** - * Get Piwik version + * Get Matomo version * @return string */ - public function getPiwikVersion() + public function getMatomoVersion() { Piwik::checkUserHasSomeViewAccess(); return Version::VERSION; } /** + * Get Matomo version + * @return string + * @deprecated + */ + public function getPiwikVersion() + { + return $this->getMatomoVersion(); + } + + /** * Get Answer to Life * @return integer */ @@ -46,7 +57,7 @@ class API extends \Piwik\Plugin\API * If used internally, the data structure can be returned untouched by using * the API parameter 'format=original' * - * @return MagicObject Will return a standard Piwik error when called from the Web APIs + * @return MagicObject Will return a standard Matomo error when called from the Web APIs */ public function getObject() { |