diff options
author | Yanick Witschi <yanick.witschi@terminal42.ch> | 2018-11-02 09:10:21 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2018-11-02 09:10:21 +0300 |
commit | b178978b979c5dcf20fe81a9b28034c0de4ce90e (patch) | |
tree | fba74526d95d1f8323507e00242a7ef274096eb9 /plugins/API | |
parent | fcd604b0bc1fdbb4f741a99a58abdc93dd25fd57 (diff) |
Added API endpoint to return the php version info (#13646)
* Added API endpoint to return the php version info
* Do not test API.getPhpVersion
* Updated expected screenshot
* User must have super user access to access the php version
Diffstat (limited to 'plugins/API')
-rw-r--r-- | plugins/API/API.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/API/API.php b/plugins/API/API.php index f27a38d13f..0f8e2dda46 100644 --- a/plugins/API/API.php +++ b/plugins/API/API.php @@ -90,6 +90,23 @@ class API extends \Piwik\Plugin\API } /** + * Get PHP version + * @return array + */ + public function getPhpVersion() + { + Piwik::checkUserHasSuperUserAccess(); + return array( + 'version' => PHP_VERSION, + 'major' => PHP_MAJOR_VERSION, + 'minor' => PHP_MINOR_VERSION, + 'release' => PHP_RELEASE_VERSION, + 'versionId' => PHP_VERSION_ID, + 'extra' => PHP_EXTRA_VERSION, + ); + } + + /** * Get Matomo version * @return string * @deprecated |