Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (26 sloc) 670 Bytes

MobileDetect Yii Extension

This Extension based on Mobile_Detect class writed by Serban Ghita and Victor Stanciu

Install

In app config:

'components'=>array(
    ...

    'mobileDetect' => array(
        'class' => 'ext.MobileDetect.MobileDetect'
    ),
    
    ...
);

Usage

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

Links

Class site
Class (GitHub)
Example