mobiledetect

Get information about mobile device
22 followers

Extension allows you to get information about mobile device.
This extension based on Mobile_Detect class.

Requirements

Yii 1.1 or above

Installation

  1. Download extension from repository https://github.com/iamsalnikov/MobileDetect
  2. Install into your extension dir (ext.MobileDetect)
  3. Include component
'components'=>array(
    ...
 
    'mobileDetect' => array(
        'class' => 'ext.MobileDetect.MobileDetect'
    ),
 
    ...
);

Usage

This extension support all methods from Mobile_Detect Class.

$detect = Yii::app()->mobileDetect;
// call methods
$detect->isMobile();
$detect->isTablet();
$detect->isIphone();
...

Total 1 comment

#11501 report it
mastermunj at 2013/01/17 03:36am
Separate component class

Nice extension, but wouldn't it be good to have separate component class which handles Yii integration keeping the original Mobile_Detect class intact? Thus users can always update original file whenever they need rather than being dependent on this extension.

Leave a comment

Please to leave your comment.

Create extension
  • License: MIT License
  • Developed by: IAmSalnikov
  • Category: Others
  • Votes: +11
  • Downloaded: 173 times
  • Created on: Jan 16, 2013
  • Last updated: never