2017 © Pedro Peláez
 

yii2-extension yii2-browser-info

Browser Information for Yii2

image

alexander-suter/yii2-browser-info

Browser Information for Yii2

  • Monday, June 29, 2015
  • by alexsuter
  • Repository
  • 1 Watchers
  • 2 Stars
  • 1,786 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

yii2-browser-info

Latest Stable Version Total Downloads Build Status Dependency Status Scrutinizer Quality Score, (*1)

Yii2 extension. Provides detailed information about the browser., (*2)

Current available providers: - Browscap (https://github.com/browscap/browscap-php), (*3)

Installation

The preferred way to install this extension is through composer., (*4)

To install, either run, (*5)

$ php composer.phar require alexander-suter/yii2-browser-info "*"

or add, (*6)

"alexander-suter/yii2-browser-info": "*"

to the require section of your composer.json file., (*7)

Usage

This extensions works with a cache in the background. You have to update the cache from time to time., (*8)

Create a cronjob and execute following command:, (*9)

./yii browser-info/update-cache

Use dependency injection to define the concret instance:, (*10)

Yii::$container->set('asu\browserinfo\BrowserInfo', [
            'class' => 'asu\browserinfo\BrowserInfoBrowscap',
            'memoryLimit' => '512M' 
]);

The Browscap implementation needs much memory to update the cache., (*11)

To get browser information in a controller you can now use your DI-Definition:, (*12)

class SiteController extends Controller {
      private $browserInfo = null;
      public function __construct($id, $module, BrowserInfo $browserInfo, $config = []) {
        $this->browserInfo = $browserInfo;
        parent::__construct($id, $module, $config);
      }
      public function actionIndex() {
        echo $this->browserInfo->getBrowserName();
      }
}

The Versions

29/06 2015

dev-master

9999999-dev https://github.com/alexander-suter/yii2-browser-info

Browser Information for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alexander Suter

yii2 browser browser-info

29/06 2015

2.0.2

2.0.2.0 https://github.com/alexander-suter/yii2-browser-info

Browser Information for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Alexander Suter

yii2 browser browser-info

22/06 2015

2.0.1

2.0.1.0 https://github.com/alexander-suter/yii2-browser-info

Browser Information for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

by Alexander Suter

yii2 browser browser-info

30/05 2015

2.0.0

2.0.0.0 https://github.com/alexander-suter/yii2-browser-info

Browser Information for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

by Alexander Suter

yii2 browser browser-info

27/05 2015

1.1.0

1.1.0.0 https://github.com/alexander-suter/yii2-browser-info

Browser Information for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

by Alexander Suter

yii2 browser browser-info

27/05 2015

1.0.2

1.0.2.0 https://github.com/alexander-suter/yii2-browser-info

Browser Information for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

by Alexander Suter

yii2 browser browser-info

25/05 2015

v1.0.1

1.0.1.0 https://github.com/alexander-suter/yii2-browser-info

Browser Information for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

by Alexander Suter

yii2 browser browser-info

22/05 2015

v1.0.0

1.0.0.0 https://github.com/alexander-suter/yii2-browser-info

Browser Information for Yii2

  Sources   Download

BSD-3-Clause

The Requires

 

by Alexander Suter

yii2 browser browser-info