mimmi20 / device-detector-factory
Provides a factory for matomo/device-detector to use with Laminas
3.0.2
2024-09-14 07:18 UTC
Requires
- php: ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0
- laminas/laminas-http: ^2.19.0
- matomo/device-detector: ^6.4.0
- 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.27.11 || ^0.28.1
- laminas/laminas-modulemanager: ^2.16.0
- laminas/laminas-servicemanager: ^3.22.1
- mimmi20/coding-standard: ^5.2.43
- nikic/php-parser: ^4.19.1 || ^5.0.2
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: ^1.12.3
- phpstan/phpstan-deprecation-rules: ^1.2.1
- phpstan/phpstan-phpunit: ^1.4.0
- phpunit/phpunit: ^10.5.25
- psr/container: ^1.1.2 || ^2.0.2
- rector/rector: ^1.2.5
- rector/type-perfect: ^0.2.0
- symplify/phpstan-rules: ^13.0.1
- tomasvotruba/cognitive-complexity: ^0.2.3
- tomasvotruba/type-coverage: ^0.3.1
- tomasvotruba/unused-public: ^0.3.11
Suggests
- laminas/laminas-servicemanager: Required for the Factories
This package is auto-updated.
Last update: 2024-11-02 10:16:42 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
.