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:
Diffstat (limited to 'plugins/Diagnostics/Diagnostic/ServerInformational.php')
-rw-r--r--plugins/Diagnostics/Diagnostic/ServerInformational.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/plugins/Diagnostics/Diagnostic/ServerInformational.php b/plugins/Diagnostics/Diagnostic/ServerInformational.php
new file mode 100644
index 0000000000..9a2478ab54
--- /dev/null
+++ b/plugins/Diagnostics/Diagnostic/ServerInformational.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+namespace Piwik\Plugins\Diagnostics\Diagnostic;
+
+use Piwik\Translation\Translator;
+
+/**
+ * Informatation about the server.
+ */
+class ServerInformational implements Diagnostic
+{
+ /**
+ * @var Translator
+ */
+ private $translator;
+
+ public function __construct(Translator $translator)
+ {
+ $this->translator = $translator;
+ }
+
+ public function execute()
+ {
+ $results = [];
+
+ if ( ! empty( $_SERVER['SERVER_SOFTWARE'] ) ) {
+ $results[] = DiagnosticResult::informationalResult('Server Info', $_SERVER['SERVER_SOFTWARE']);
+ }
+
+ return $results;
+ }
+
+}