承接 okatsuralau/cakephp-clientinfo 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

okatsuralau/cakephp-clientinfo

Composer 安装命令:

composer require okatsuralau/cakephp-clientinfo

包简介

CakePHP plugin providing easy access to information about the client app requesting your site

README 文档

README

Software License Build Status Build Status Latest Stable Version

CakePHP ClientInfo Plugin

This plugin provides easy access to information about the client app requesting your site. It is just a wrapper and uses the Browser Detector library to collect the data.

Requirements

  • PHP >= 5.6
  • CakePHP >= 3.0

How to Install

composer require okatsuralau/cakephp-clientinfo@1.0.0

How to Use

Load the plugin in your config/bootstrap.php file:

Plugin::load('CakephpClientInfo');

Load the component in your src/Controller/AppController.php

public function initialize()
{
    parent::initialize();

    $this->loadComponent('CakephpClientInfo.ClientInfo');
}

To get the info about the client use the

public function index()
{
    // returns the browser name (eg.: Chrome)
    $this->ClientInfo->browser();
    
    // returns the O.S. name (eg.: Linux)
    $this->ClientInfo->os();
    
    // returns the Device name (eg.: Computer, Mobile, Tablet, iPhone, ...)
    $this->ClientInfo->device();
    
    // returns the browser's language (eg.: en)
    $this->ClientInfo->language();
    
    // or you can access the original instance and make calls directly to the browser-detector
    $this->ClientInfo->Browser()->getName();
}

More information about the Browser Detector library.

License

Copyright 2017 Gabriel Lau

Available for you to use under the MIT license. See: http://www.opensource.org/licenses/MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固