wake / silex-mobiledetect-provider
Silex 2 service provider (and trait) for awesome MobileDetect library.
Installs: 2 425
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.0
- mobiledetect/mobiledetectlib: ~2
- silex/silex: ~2
This package is auto-updated.
Last update: 2024-10-29 04:36:39 UTC
README
Silex 2 service provider (and trait) for awesome MobileDetect library.
Install
Use Composer
composer require wake/Silex-MobileDetect-Provider
"require": {
"wake/Silex-MobileDetect-Provider": "dev-master"
}
Service
.mobile_detect: The mobile detect instance.
Example:
$app['mobile_detect']->isMobile ();
Registering
$app->register (new Silex\Provider\MobileDetect ());
Trait
Silex\Application\MobileDetect adds the following shortcuts:
.Detect: Detecting through MobileDetect.
Example:
$app->detect ('isMobile');
安裝
使用 Composer
composer require wake/Silex-MobileDetect-Provider
"require": {
"wake/Silex-MobileDetect-Provider": "dev-master"
}
服務
.mobile_detect: MobileDetect 物件.
範例:
$app['mobile_detect']->isMobile ();
註冊
$app->register (new Silex\Provider\MobileDetect ());
Trait
Silex\Application\MobileDetect 提供下列的快速呼叫:
.detect: 檢測.
範例:
$app->detect ('isMobile');