
Yii2-mobiledetect (Определение мобильных устройств)
skeeks/yii2-mobile-detect
Yii2-mobiledetect (Определение мобильных устройств) В основе расширения, лежит использование общеизвестной библиотеки http://mobiledetect.net/
-
Семенов Александр
- /
- Otros
- /
- hace 8 años
- /
- /
- 11724
- /
- 0
Tiempo de publicación: martes, 30 de junio de 2015 (hace 8 años)
Creado por: Семенов Александр Сергеевич
Categoría: Otros
Versión actual:
1 ene. 1970 3:00:00 (hace 53 años)
Packagist: skeeks/yii2-mobile-detect
: https://github.com/skeeks-semenov/yii2-mobile-detect
:
Tipo: Компонент
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 — 1 ene. 1970 3:00:00 (hace 53 años)
1.0.2 — 1 ene. 1970 3:00:00 (hace 53 años)
1.0.1 — 1 ene. 1970 3:00:00 (hace 53 años)
1.0.0 — 1 ene. 1970 3:00:00 (hace 53 años)
Стандартная установка:
Добавьте composer.json файл вашего проекта:
"skeeks/yii2-mobile-detect": "*"
Запустите обновление зависимостей
todos los comentarios (0)