mimmi20/device-detector-factory

为matomo/device-detector提供一个用于Laminas的工厂

3.0.2 2024-09-14 07:18 UTC

README

Latest Stable Version Latest Unstable Version License

代码状态

codecov Test Coverage Coverage Status Average time to resolve an issue Percentage of issues still open Mutation testing badge Maintainability

要求

此库需要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