Download the PHP package eprofos/user-agent-analyzer without Composer
On this page you can find all versions of the php package eprofos/user-agent-analyzer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eprofos/user-agent-analyzer
More information about eprofos/user-agent-analyzer
Files in eprofos/user-agent-analyzer
Package user-agent-analyzer
Short Description A powerful Symfony bundle for user-agent analysis. It provides accurate detection of operating systems (Windows, MacOS, Linux, iOS, Android...), browsers (Chrome, Firefox, Safari...), and device types (Desktop, Mobile, Tablet, TV...). Supports specific version detection and includes advanced handling of special cases like WebViews and compatibility modes. Features comprehensive logging and detailed analysis results.
License MIT
Homepage https://github.com/eprofos/user-agent-analyzer
Informations about the package user-agent-analyzer
EprofosUserAgentAnalyzerBundle
A powerful Symfony bundle for user-agent analysis. It provides accurate detection of operating systems (Windows, MacOS, Linux, iOS, Android...), browsers (Chrome, Firefox, Safari...), and device types (Desktop, Mobile, Tablet, TV...). Supports specific version detection and includes advanced handling of special cases like WebViews and compatibility modes.
Features
-
Operating System Detection
- Windows, MacOS, Linux, iOS, Android, and more
- Version detection with codename support for MacOS
- Mobile OS variants (MIUI, EMUI, ColorOS, etc.)
- 64-bit mode detection
-
Browser Detection
- Major browsers: Chrome, Firefox, Safari, Edge, Opera
- Mobile browsers and WebViews
- Version detection and rendering engine identification
- Chromium/Gecko/WebKit version tracking
- Desktop mode detection
-
Device Detection
- Device type classification (Desktop, Mobile, Tablet, TV, etc.)
- Smart device detection (Smart TV, Game Consoles, Car Systems)
- Touch support detection
- WebView detection for Android and iOS
- Advanced Features
- Automatic User-Agent detection from current request
- Comprehensive logging support
- High accuracy through multiple detection methods
- Easy integration with Symfony applications
- Extensive test coverage
- PSR-3 logging support
Requirements
- PHP 8.2 or higher
- Symfony 7.0 or higher
Installation
Using Composer
Enable the Bundle
If you're not using Symfony Flex, add the bundle to your config/bundles.php
:
Usage
Basic Usage
Advanced Usage with Touch Support Mode
Twig Functions
The bundle provides several Twig functions for easy device and OS detection in your templates:
All Twig functions automatically analyze the current request's User-Agent string and return a boolean value indicating whether the condition is met.
Available Methods
Operating System Information
getOsType()
: Get OS type (desktop, mobile, etc.)getOsFamily()
: Get OS family (windows, macintosh, etc.)getOsName()
: Get OS namegetOsVersion()
: Get OS versiongetOsTitle()
: Get formatted OS name with version
Browser Information
getBrowserName()
: Get browser namegetBrowserVersion()
: Get browser versiongetBrowserTitle()
: Get formatted browser name with versiongetBrowserChromiumVersion()
: Get Chromium version if applicablegetBrowserGeckoVersion()
: Get Gecko version if applicablegetBrowserWebkitVersion()
: Get WebKit version if applicableisBrowserChromeOriginal()
: Check if browser is original ChromeisBrowserFirefoxOriginal()
: Check if browser is original FirefoxisBrowserSafariOriginal()
: Check if browser is original Safari
Device Information
getDeviceType()
: Get device typeisMobile()
: Check if device is mobileisDesktop()
: Check if device is desktopisTablet()
: Check if device is tabletisBrowserAndroidWebview()
: Check if Android WebViewisBrowserIosWebview()
: Check if iOS WebViewisBrowserDesktopMode()
: Check if desktop modeis64BitsMode()
: Check if 64-bit mode
Testing
Quality Tools
Contributing
Feel free to contribute to this bundle by submitting issues and pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
This bundle is released under the MIT License. See the bundled LICENSE file for details.
Credits
Developed by Eprofos.
All versions of user-agent-analyzer with dependencies
symfony/framework-bundle Version ^7.0
symfony/dependency-injection Version ^7.0
symfony/http-kernel Version ^7.0
symfony/config Version ^7.0
symfony/http-foundation Version ^7.0
psr/log Version ^3.0
symfony/yaml Version ^7.0
twig/twig Version ^3.0