panychek/zf-device-detector 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

panychek/zf-device-detector

Composer 安装命令:

composer require panychek/zf-device-detector

包简介

ZF3 module that utilizes the DeviceDetector library

README 文档

README

ZF3 module that utilizes the DeviceDetector library to provide device detection support for your MVC application.

Installation

Install the module via Composer:

composer require panychek/zf-device-detector

Then add the module name to your project's config/application.config.php under the modules key:

return [
    'modules' => [
        // ...
        'ZfDeviceDetector',
    ],
    // ...
];

Usage

This module registers a new service in your application's service manager, which will be available under the DeviceDetector::class key. This service provides an actual DeviceDetector instance, initialized with the User Agent fetched from the built-in Request service.

The module also provides a view helper and a controller plugin that proxy all the calls to that instance.

For more information on the supported features, please refer to the library documentation.

Service

Within your factories use:

$deviceDetector = $container->get(DeviceDetector::class);
$client = $deviceDetector->getClient();

View helper

Within your view templates use:

$client = $this->deviceDetector()->getClient();

Controller plugin

Within your controllers use:

$client = $this->deviceDetector()->getClient();

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固