Chuyển đến nội dung
Tài liệu

Tra cứu lớp và hàm

UA

Danh sách các phương thức công khai của lớp Zittme\Framework\UA. Tài liệu này được tạo tự động từ mã nguồn lõi Zittme.

Nguồn: common/framework/UA.php

Phương thức công khai

  • static function isMobile(?string $ua = null)
  • Check whether the current visitor is using a mobile device.
  • static function isTablet(?string $ua = null)
  • Check whether the current visitor is using a tablet.
  • static function isRobot(?string $ua = null)
  • Check whether the current visitor is a robot.
  • static function getLocale(?string $header = null)
  • This method parses the Accept-Language header to guess the browser's default locale.
  • static function getBrowserInfo(?string $ua = null)
  • This method parses the User-Agent string to guess what kind of browser it is.
  • static function encodeFilenameForDownload(string $filename, ?string $ua = null)
  • This method encodes a UTF-8 filename for downloading in the current visitor's browser.
  • static function getColorScheme()
  • Get the current color scheme (auto, light, dark)
  • static function setColorScheme(string $color_scheme)
  • Set the color scheme (auto, light, dark)