https://github.com/candasm/yii1-mobile-detect-component
Mobile Detect Component for YiiFramework 1.1.x
https://github.com/candasm/yii1-mobile-detect-component
mobile-detection yii-extension yii-framework
Last synced: 8 months ago
JSON representation
Mobile Detect Component for YiiFramework 1.1.x
- Host: GitHub
- URL: https://github.com/candasm/yii1-mobile-detect-component
- Owner: candasm
- License: mit
- Created: 2017-02-13T08:27:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-13T09:32:29.000Z (over 9 years ago)
- Last Synced: 2024-09-30T22:35:00.941Z (almost 2 years ago)
- Topics: mobile-detection, yii-extension, yii-framework
- Language: PHP
- Size: 4.88 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### MobileDetect Component for Yii 1.x
[](https://packagist.org/packages/candasm/yii1-mobile-detect-component)
[](https://travis-ci.org/candasm/yii1-mobile-detect-component)
[](https://packagist.org/packages/candasm/yii1-mobile-detect-component)
[](https://coveralls.io/github/candasm/yii1-mobile-detect-component?branch=master)
[](https://packagist.org/packages/candasm/yii1-mobile-detect-component)
### Install
In app config:
```php
'components'=>array(
...
'mobileDetect' => array(
'class' => 'application.vendors.candasm.yii1-mobile-detect-component.src.MobileDetectComponent'
),
...
);
```
### Usage
```php
$detect = Yii::app()->mobileDetect;
// call methods
$detect->isMobile();
$detect->isTablet();
$detect->isIphone();
...
```
For more information visit [MobileDetect](https://github.com/serbanghita/Mobile-Detect) Library.
#####Note: Don't forget to set vendor-dir in composer.json file for YiiFramework 1.1.x versions.
```
"config":{
"vendor-dir":"protected/vendor/"
},
```