@@ 8-23 (lines=16) @@ | ||
5 | ||
6 | use EndorphinStudio\Detector\Tools; |
|
7 | ||
8 | class BrowserDetector extends AbstractDetection |
|
9 | { |
|
10 | protected $configKey = 'browser'; |
|
11 | ||
12 | protected function setupResultObject() |
|
13 | { |
|
14 | $browserData = $this->detectByType(); |
|
15 | foreach ($browserData as $key => $value) { |
|
16 | if ($key === 'originalInfo') { |
|
17 | $this->setAttributes($value); |
|
18 | continue; |
|
19 | } |
|
20 | Tools::runSetter($this->resultObject, $key, $value); |
|
21 | } |
|
22 | } |
|
23 | } |
@@ 8-23 (lines=16) @@ | ||
5 | ||
6 | use EndorphinStudio\Detector\Tools; |
|
7 | ||
8 | class OsDetector extends AbstractDetection |
|
9 | { |
|
10 | protected $configKey = 'os'; |
|
11 | ||
12 | protected function setupResultObject() |
|
13 | { |
|
14 | $osData = $this->detectByKey('family'); |
|
15 | foreach ($osData as $key => $value) { |
|
16 | if ($key === 'originalInfo') { |
|
17 | $this->setAttributes($value); |
|
18 | continue; |
|
19 | } |
|
20 | Tools::runSetter($this->resultObject, $key, $value); |
|
21 | } |
|
22 | } |
|
23 | } |