candasm / yii1-mobile-detect-component
针对YiiFramework 1.x的MobileDetect库
1.0.2
2017-02-13 08:25 UTC
Requires
- php: >=5.3.0
- mobiledetect/mobiledetectlib: ~2.7
- yiisoft/yii: ~1.1.14
Requires (Dev)
- phpunit/dbunit: ~1.2
- phpunit/php-invoker: ^1.1
- phpunit/phpunit: ~3.7
- phpunit/phpunit-selenium: ~1.4.2
- phpunit/phpunit-story: ^1.0
- satooshi/php-coveralls: ^1.0
- squizlabs/php_codesniffer: ~2.8
This package is auto-updated.
Last update: 2024-09-10 05:33:42 UTC
README
为Yii 1.x的MobileDetect组件
安装
在应用配置中
'components'=>array( ... 'mobileDetect' => array( 'class' => 'application.vendors.candasm.yii1-mobile-detect-component.src.MobileDetectComponent' ), ... );
用法
$detect = Yii::app()->mobileDetect; // call methods $detect->isMobile(); $detect->isTablet(); $detect->isIphone(); ...
更多详细信息请访问 MobileDetect 库。
#####注意:请不要忘记在composer.json文件中设置vendor-dir,以适用于YiiFramework 1.1.x版本。
"config":{
"vendor-dir":"protected/vendor/"
},