2017 © Pedro Peláez
 

yii2-extension yii2-user-agent-parser

The user agent parser for the Yii framework (Yii2)

image

nmdimas/yii2-user-agent-parser

The user agent parser for the Yii framework (Yii2)

  • Sunday, December 4, 2016
  • by NmDimas
  • Repository
  • 1 Watchers
  • 7 Stars
  • 2,684 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

Yii2 extension for user agent parser

Build Status HHVM Status, (*1)

This extension adds support for PhpUserAgent(https://github.com/donatj/PhpUserAgent) to the Yii2 framework., (*2)

Installation

'components' => [
      ...
      'userAgentParser' => [
          'class' => 'yii\useragentparser\UserAgentParser',
          'nameHttpPropertyUserAgent' => 'HTTP_USER_AGENT'
      ],
      ...
  ],

Usage

If we parse current request, (*3)

$userAgentInfo = Yii::$app->userAgentParser->getUserAgentObject();

or need parse isset user-agent, (*4)

$userAgentInfo = Yii::$app->userAgentParser->getUserAgentObject($userAgent);

$userAgentInfo it's UserAgentObject with properties: - userAgent - platform - browser - version, (*5)

Best practices

Add to Yii.php in root for autocompletion for custom components., (*6)

 /** @property  \yii\useragentparser\UserAgentParser $userAgentParser */

About autocompletion for custom components., (*7)

https://github.com/samdark/yii2-cookbook/blob/master/book/ide-autocompletion.md, (*8)

The Versions

04/12 2016

dev-master

9999999-dev

The user agent parser for the Yii framework (Yii2)

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Dmytro Nemesh

parser yii2 user-agent uaparser

23/07 2015

1.0

1.0.0.0

The user agent parser for the Yii framework (Yii2)

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Dmytro Nemesh

parser yii2 user-agent uaparser