ideato / cloudfront-device-detect
Detect devices based on CloudFront caching headers
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 26
Forks: 0
pkg:composer/ideato/cloudfront-device-detect
Requires (Dev)
- phpunit/phpunit: ^7.1
This package is auto-updated.
Last update: 2025-10-10 01:51:51 UTC
README
Detect devices based on CloudFront caching headers. More info on CloudFront headers are available here.
How to use
$detector = new \CloudFrontDeviceDetect\Detector();
$detector->isDesktop();
$detector->isDesktopOrTablet();
$detector->isMobile();
$detector->isTablet();
$detector->isSmartTV();
$detector->isMobileOrTablet();
Helpers
If you want to use the library with default settings you can use helper functions as follows:
use CloudFrontDeviceDetect;
isDesktop();
isDesktopOrTablet();
isMobile();
isTablet();
isSmartTV();
isMobileOrTablet();
Requirements
PHP 7.1 or above
Authors
- Simone D'Amico sd@ideato.it
- other contributors
License
The library is licensed under the MIT License