Automattic\WooCommerce\Vendor\Detection
MobileDetect::__construct()
Construct an instance of this class.
Метод класса: MobileDetect{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$MobileDetect = new MobileDetect(); $MobileDetect->__construct( $headers, $userAgent );
- $headers(массив|null)
- Specify the headers as injection. Should be PHP _SERVER flavored. If left empty, will use the global _SERVER['HTTP_'] vars instead.
По умолчанию: null* - $userAgent(строка|null)
- Inject the User-Agent header. If null, will use HTTP_USER_AGENT from the $headers array instead.
По умолчанию: null
Код MobileDetect::__construct() MobileDetect:: construct WC 9.6.2
public function __construct(array $headers = null, string $userAgent = null) { $this->setHttpHeaders($headers); $this->setUserAgent($userAgent); }