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/Resolution/VisitorDetails.php')
-rw-r--r--plugins/Resolution/VisitorDetails.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/Resolution/VisitorDetails.php b/plugins/Resolution/VisitorDetails.php
new file mode 100644
index 0000000000..d6ccedb0a5
--- /dev/null
+++ b/plugins/Resolution/VisitorDetails.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+namespace Piwik\Plugins\Resolution;
+
+use Piwik\Plugins\Live\VisitorDetailsAbstract;
+
+class VisitorDetails extends VisitorDetailsAbstract
+{
+ public function extendVisitorDetails(&$visitor)
+ {
+ $visitor['resolution'] = $this->getResolution();
+ }
+
+ protected function getResolution()
+ {
+ if (!array_key_exists('config_resolution', $this->details)) {
+ return null;
+ }
+
+ return $this->details['config_resolution'];
+ }
+} \ No newline at end of file