PHPackages                             xj/yii2-user-agent - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. xj/yii2-user-agent

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

xj/yii2-user-agent
==================

yii2-user-agent

1.0.0(10y ago)37.1k1BSD-3-ClausePHP

Since Aug 19Pushed 10y ago1 watchersCompare

[ Source](https://github.com/xjflyttp/yii2-user-agent)[ Packagist](https://packagist.org/packages/xj/yii2-user-agent)[ RSS](/packages/xj-yii2-user-agent/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (1)

yii2-user-agent
===============

[](#yii2-user-agent)

```
https://github.com/donatj/PhpUserAgent

```

composer.json
-------------

[](#composerjson)

```
"require": {
    "xj/yii2-user-agent": "~1.0.0"
}
```

Usage
-----

[](#usage)

```
//A
var_dump(\xj\ua\UserAgent::model()->getAttributes());

//B
$userAgent = \xj\ua\UserAgent::model();
/* @var \xj\ua\UserAgent $userAgent */
$platform = $userAgent->platform;
$browser = $userAgent->browser;
$version = $userAgent->version;
$uaAttributes =  $userAgent->getAttributes(); // OR $userAgent->attributes
var_dump($platform, $browser, $version, $uaAttributes);
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

3919d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f9f04ccc1ccda3af80975323425ff7d5f7d142603f1ad05df6558ffa63256f8d?d=identicon)[xjflyttp](/maintainers/xjflyttp)

---

Top Contributors

[![xjflyttp](https://avatars.githubusercontent.com/u/128428?v=4)](https://github.com/xjflyttp "xjflyttp (4 commits)")

### Embed Badge

![Health badge](/badges/xj-yii2-user-agent/health.svg)

```
[![Health](https://phpackages.com/badges/xj-yii2-user-agent/health.svg)](https://phpackages.com/packages/xj-yii2-user-agent)
```

###  Alternatives

[froala/wysiwyg-editor

A beautiful jQuery WYSIWYG HTML rich text editor. High performance and modern design make it easy to use for developers and loved by users.

5.4k306.9k3](/packages/froala-wysiwyg-editor)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[rewieer/taskschedulerbundle

Task Scheduler with CRON for Symfony

63242.1k](/packages/rewieer-taskschedulerbundle)[ghoster/module-outofstockatlast

Magento 2.4.x module Sort Out Of Stock Product At last the product list

60122.6k](/packages/ghoster-module-outofstockatlast)[fof/byobu

Well integrated, advanced private discussions.

61105.8k9](/packages/fof-byobu)[flowpack/listable

Tiny extension for listing things

35209.0k7](/packages/flowpack-listable)

PHPackages © 2026

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