mimmi20 / device-detector-factory

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

device-detector-factory

Latest Stable Version Latest Unstable Version License

Code Status

codecov Average time to resolve an issue Percentage of issues still open Mutation testing badge

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.

About

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

License:MIT License


Languages

Language:PHP 100.0%