mimmi20 / device-detector-factory
为matomo/device-detector提供一个用于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
README
代码状态
要求
此库需要PHP 8.1+。
安装
运行
composer require mimmi20/device-detector-factory
与Laminas和Mezzio一起使用
您需要添加配置并注册您想使用的服务。有几种方法可以实现这一点,但推荐的方法是创建一个新的配置文件 config/autoload/detector.config.php
配置
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 ], ];
许可证
此软件包使用MIT许可证授权。
请参阅LICENSE.md
。