Download the PHP package acsiomatic/device-detector-bundle without Composer
On this page you can find all versions of the php package acsiomatic/device-detector-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download acsiomatic/device-detector-bundle
More information about acsiomatic/device-detector-bundle
Files in acsiomatic/device-detector-bundle
Package device-detector-bundle
Short Description Symfony Bundle for https://github.com/matomo-org/device-detector
License MIT
Informations about the package device-detector-bundle
AcsiomaticDeviceDetectorBundle
The AcsiomaticDeviceDetectorBundle
provides integration of the DeviceDetector library into the Symfony framework.
DeviceDetector is a Universal Device Detection library that parses User Agents and Browser Client Hints to detect devices (desktop, tablet, mobile, tv, cars, console, etc.), clients (browsers, feed readers, media players, PIMs, ...), operating systems, brands and models.
This bundle provides the DeviceDetector
class as service, and Twig global variable.
- Installation
- Configuration
- Usage
- Usage in controllers
- Usage in Twig
- Usage in route condition
- Parsing custom request
- Release Policy
- Dependencies Compatibility Policy
Installation
You can install the bundle using Composer:
Configuration
You can configure the bundle using the acsiomatic_device_detector
configuration section:
Usage
Usage in controllers
You can inject DeviceDetector
as a service.
This bundle sets up an instance of this class according to the configurations under the acsiomatic_device_detector
section in order to provide information about the main request.
[!NOTE] You need to call
$device->parse()
before asking for device's information ifauto_parse
configuration is false.
Usage in Twig
The DeviceDetector
service is assigned to the Twig templates as device
variable.
Usage in route condition
The DeviceDetector
is tagged as routing condition service.
Parsing custom request
You might want to parse other request than the current one.
This bundle provides a service that implements DeviceDetectorFactoryInterface.
This service provides methods that create fresh DeviceDetector
instances according to the configurations under the acsiomatic_device_detector
section, but it doesn't attach them to any request.
Custom parsers
You can inject custom parsers into DeviceDetector
by providing them as services.
If autoconfigure is enabled, the bundle injects custom parsers. Otherwise, you need to add the corresponding tag to each custom parsers:
acsiomatic.device_detector.bot_parser
acsiomatic.device_detector.client_parser
acsiomatic.device_detector.device_parser
Release Policy
There is a single maintained branch per time. This branch targets a minor version.
A maintained version reaches its end-of-life when a new minor version is released.
Dependencies Compatibility Policy
This library is compatible with maintained versions of PHP, Device Detector, and Symfony.
All versions of device-detector-bundle with dependencies
friendsofphp/proxy-manager-lts Version ^1.0
matomo/device-detector Version ^6.2
symfony/framework-bundle Version ^5.4 || ^6.4 || ^7.0