https://github.com/mimmi20/device-detector-factory
a factory for matomo/device-detector to use with Laminas
https://github.com/mimmi20/device-detector-factory
php83
Last synced: 2 months ago
JSON representation
a factory for matomo/device-detector to use with Laminas
- Host: GitHub
- URL: https://github.com/mimmi20/device-detector-factory
- Owner: mimmi20
- License: mit
- Created: 2022-08-05T06:43:11.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-07T05:29:18.000Z (2 months ago)
- Last Synced: 2025-02-07T06:25:19.659Z (2 months ago)
- Topics: php83
- Language: PHP
- Homepage:
- Size: 522 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# device-detector-factory
[](https://packagist.org/packages/mimmi20/device-detector-factory)
[](https://packagist.org/packages/mimmi20/device-detector-factory)
[](https://packagist.org/packages/mimmi20/device-detector-factory)## Code Status
[](https://codecov.io/gh/mimmi20/device-detector-factory)
[](https://codeclimate.com/github/mimmi20/device-detector-factory/test_coverage)
[](https://coveralls.io/github/mimmi20/device-detector-factory?branch=master)
[](https://isitmaintained.com/project/mimmi20/device-detector-factory "Average time to resolve an issue")
[](https://isitmaintained.com/project/mimmi20/device-detector-factory "Percentage of issues still open")
[](https://dashboard.stryker-mutator.io/reports/github.com/mimmi20/device-detector-factory/master)
[](https://codeclimate.com/github/mimmi20/device-detector-factory/maintainability)## Requirements
This library requires PHP 8.1+.
## Installation
Run
```shell
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
[
'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`](LICENSE.md).