
Yii2-mobiledetect (Определение мобильных устройств)
skeeks/yii2-mobile-detect
Yii2-mobiledetect (Определение мобильных устройств) В основе расширения, лежит использование общеизвестной библиотеки http://mobiledetect.net/
-
Семенов Александр
- /
- Other
- /
- 8 years ago
- /
- /
- 11703
- /
- 0
Publication time: Tuesday, June 30, 2015 (8 years ago)
Created by: Семенов Александр Сергеевич
Category: Other
Current version:
Jan 1, 1970, 3:00:00 AM (53 years ago)
Packagist: skeeks/yii2-mobile-detect
: https://github.com/skeeks-semenov/yii2-mobile-detect
:
Type of: Компонент
Yii2-mobiledetect (Определение мобильных устройств) В основе расширения, лежит использование общеизвестной библиотеки http://mobiledetect.net/
Mobile Detect extension for Yii2
This extension provides an Yii2 component wrapper for Mobile_Detect PHP class and can be used to detect whether a device is mobile one in your Yii2 application.
Installation
The preferred way to install this extension is through Composer.
Either run
php composer.phar require --prefer-dist skeeks/yii2-mobile-detect
or add
"skeeks/yii2-mobile-detect": "^1.0.2"
to the require
section of your composer.json
file.
Usage
Add
mobileDetect
component to your Yii2 configuration like this:'components' => [ 'mobileDetect' => [ 'class' => '\skeeks\yii2\mobiledetect\MobileDetect' ] ]
Use
mobileDetect
component as Mobile_Detect PHP class:echo \Yii::$app->mobileDetect->isMobile(); echo \Yii::$app->mobileDetect->isTablet(); echo \Yii::$app->mobileDetect->isDesctop();
//version >= 1.0.1 echo \skeeks\yii2\mobiledetect\MobileDetect::getInstance()->isMobile();
SkeekS CMS (Yii2) — quickly, easily and effectively!
skeeks.com | cms.skeeks.com
Процесс разработки
1.0.2
- Add properties isMobile isDesktop isTablet
- Fixed https://github.com/skeeks-semenov/yii2-mobile-detect/issues/1
1.0.1
- Добавлен новый метод \skeeks\yii2\mobiledetect\MobileDetect::getInstance()
- Исправлена кодировка файлов на utf-8
1.0.0
- Начало
dev-master — Jan 1, 1970, 3:00:00 AM (53 years ago)
1.0.2 — Jan 1, 1970, 3:00:00 AM (53 years ago)
1.0.1 — Jan 1, 1970, 3:00:00 AM (53 years ago)
1.0.0 — Jan 1, 1970, 3:00:00 AM (53 years ago)
Стандартная установка:
Добавьте composer.json файл вашего проекта:
"skeeks/yii2-mobile-detect": "*"
Запустите обновление зависимостей
All Comments (0)