mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-07 13:08:40 +00:00
improve request stats
This commit is contained in:
parent
61eb86ae6f
commit
0844846f51
|
|
@ -165,7 +165,7 @@ final class HttpHeader extends HeaderAbstract
|
||||||
|
|
||||||
if (\strpos($userAgent, 'Opera') !== false || \strpos($userAgent, 'OPR/') !== false) {
|
if (\strpos($userAgent, 'Opera') !== false || \strpos($userAgent, 'OPR/') !== false) {
|
||||||
return 'Opera';
|
return 'Opera';
|
||||||
} elseif (\strpos($userAgent, 'Edge') !== false) {
|
} elseif (\strpos($userAgent, 'Edge') !== false || \strpos($userAgent, 'Edg/') !== false) {
|
||||||
return 'Microsoft Edge';
|
return 'Microsoft Edge';
|
||||||
} elseif (\strpos($userAgent, 'Chrome') !== false) {
|
} elseif (\strpos($userAgent, 'Chrome') !== false) {
|
||||||
return 'Google Chrome';
|
return 'Google Chrome';
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,8 @@ class ImpressionStat
|
||||||
|
|
||||||
public string $userAgent = '';
|
public string $userAgent = '';
|
||||||
|
|
||||||
|
public array $meta = [];
|
||||||
|
|
||||||
public function __construct(HttpRequest $request)
|
public function __construct(HttpRequest $request)
|
||||||
{
|
{
|
||||||
$this->language = $request->header->l11n->language;
|
$this->language = $request->header->l11n->language;
|
||||||
|
|
@ -73,6 +75,7 @@ class ImpressionStat
|
||||||
'country' => $this->country,
|
'country' => $this->country,
|
||||||
'referer' => $this->referer,
|
'referer' => $this->referer,
|
||||||
'datetime' => $this->datetime->getTimestamp(),
|
'datetime' => $this->datetime->getTimestamp(),
|
||||||
|
'meta' => $this->meta,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user