mimmi20/device-detector-factory

Provides a factory for matomo/device-detector to use with Laminas

3.0.2 2024-09-14 07:18 UTC

README

Latest Stable Version Latest Unstable Version License

Code Status

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

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.