-
Notifications
You must be signed in to change notification settings - Fork 495
Closed
Labels
Description
Changing this would probably break backwards compatibility, so I'm not sure if this could be changed, but I want to document this nevertheless:
The output of the different methods return different values if nothing can be detected (null, empty array and "").
Example script:
<?php
require_once 'vendor/autoload.php';
use DeviceDetector\DeviceDetector;
use DeviceDetector\Parser\Device\DeviceParserAbstract;
$userAgent = "thisissomeunknownuseragent";
$dd = new DeviceDetector($userAgent);
$dd->parse();
$botInfo = $dd->getBot();
$clientInfo = $dd->getClient();
$osInfo = $dd->getOs();
$device = $dd->getDeviceName();
$brand = $dd->getBrandName();
$model = $dd->getModel();
var_dump($botInfo);
var_dump($clientInfo);
var_dump($osInfo);
var_dump($device);
var_dump($brand);
var_dump($model);
Output:
NULL
NULL
array(0) {
}
string(0) ""
string(0) ""
string(0) ""