PHPackages                             marcovtwout/yii-detectmobilebrowser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. marcovtwout/yii-detectmobilebrowser

ActiveLibrary

marcovtwout/yii-detectmobilebrowser
===================================

Handles detecting mobile browsers

1.3.0(8y ago)3183PHP

Since Oct 23Pushed 8y ago1 watchersCompare

[ Source](https://github.com/marcovtwout/yii-detectmobilebrowser)[ Packagist](https://packagist.org/packages/marcovtwout/yii-detectmobilebrowser)[ RSS](/packages/marcovtwout-yii-detectmobilebrowser/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (2)Used By (0)

yii-detectmobilebrowser
=======================

[](#yii-detectmobilebrowser)

Handles detecting mobile browsers. Results are stored locally for caching calls within the same request, and stored in a cookie for caching across requests.

Detection regex used from

Requirements
------------

[](#requirements)

Tested on Yii 1.1.8 - 1.1.14, should work on all versions.

Installation
------------

[](#installation)

Install as an application component, in your config:

```
'components' => array(
   'detectMobileBrowser' => array(
       'class' => 'ext.yii-detectmobilebrowser.XDetectMobileBrowser',
       //'secure' => true,
       //'httpOnly' => true,
    ),
),
```

Usage
-----

[](#usage)

You can get the current user preference like this:

```
if (Yii::app()->detectMobileBrowser->showMobile) {
    // do something
}
```

By default it will use the automatically detected value. You can also set the preference yourself like this:

```
public function actionShowMobile() {
    Yii::app()->detectMobileBrowser->showMobile = true;
    $this->redirect(array('/site/index'));
}
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 81.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3123d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c1635dd8638c04f84d60d74d820605821f413df6efca9eb0bfd9d5389246d25?d=identicon)[marcovtwout](/maintainers/marcovtwout)

---

Top Contributors

[![marcovtwout](https://avatars.githubusercontent.com/u/438046?v=4)](https://github.com/marcovtwout "marcovtwout (13 commits)")[![thomaslorentsen](https://avatars.githubusercontent.com/u/11646737?v=4)](https://github.com/thomaslorentsen "thomaslorentsen (3 commits)")

### Embed Badge

![Health badge](/badges/marcovtwout-yii-detectmobilebrowser/health.svg)

```
[![Health](https://phpackages.com/badges/marcovtwout-yii-detectmobilebrowser/health.svg)](https://phpackages.com/packages/marcovtwout-yii-detectmobilebrowser)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
