mimmi20 / device-detector-factory
Provides a factory for matomo/device-detector to use with Laminas
4.0.0
2024-12-07 23:32 UTC
Requires
- php: ~8.3.0 || ~8.4.0 || ~8.5.0
- laminas/laminas-http: ^2.21.0
- matomo/device-detector: ^6.4.1
- psr/cache: ^3.0.0
- psr/simple-cache: ^1.0.0 || ^2.0.0 || ^3.0.0
Requires (Dev)
- ext-ctype: *
- ext-dom: *
- ext-simplexml: *
- ext-tokenizer: *
- ext-xml: *
- ext-xmlwriter: *
- infection/infection: ^0.29.8
- laminas/laminas-modulemanager: ^2.17.0
- laminas/laminas-servicemanager: ^3.22.1
- mimmi20/coding-standard: ^6.0.1
- nikic/php-parser: ^5.3.1
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: ^1.12.9
- phpstan/phpstan-deprecation-rules: ^1.2.1
- phpstan/phpstan-phpunit: ^1.4.0
- phpunit/phpunit: ^11.5.0
- psr/container: ^1.1.2 || ^2.0.2
- rector/rector: ^1.2.10
- rector/type-perfect: ^1.0.0
- symfony/process: ^7.2.0
- symplify/phpstan-rules: ^13.0.1
- tomasvotruba/cognitive-complexity: ^0.2.3
- tomasvotruba/type-coverage: ^1.0.0
- tomasvotruba/unused-public: ^1.1.0
Suggests
- laminas/laminas-servicemanager: Required for the Factories
This package is auto-updated.
Last update: 2024-12-23 05:43:54 UTC
README
Code Status
Requirements
This library requires PHP 8.1+.
Installation
Run
composer require mimmi20/device-detector-factory
Usage with Laminas and Mezzio
You'll need to add configuration and register the services you'd like to use. There are number of ways to do that
but the recommended way is to create a new config file config/autoload/detector.config.php
Configuration
config/autoload/detector.config.php
<?php return [ 'device-detector' => [ 'discard-bot-information' => true, // Optional: defaults to false 'skip-bot-detection' => true, // Optional: defaults to false 'cache' => 'data-cache', // Optional, may be a string or an instance of \Laminas\Cache\Storage\StorageInterface ], ];
License
This package is licensed using the MIT License.
Please have a look at LICENSE.md
.