PHPackages                             godsdev/default-device-connector - 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. godsdev/default-device-connector

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

godsdev/default-device-connector
================================

PHP connector to default device service

v1.0.4(10y ago)0226PHPPHP &gt;=5.3.0

Since Feb 11Pushed 10y ago1 watchersCompare

[ Source](https://github.com/godsdev/default-device-connector)[ Packagist](https://packagist.org/packages/godsdev/default-device-connector)[ RSS](/packages/godsdev-default-device-connector/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (5)Dependencies (1)Versions (4)Used By (0)

default-device-connector
========================

[](#default-device-connector)

PHP connector for defauldevice service

For security (not revealing files that SHOULD NOT be accessed through browser) mod\_alias.c SHOULD be enabled in the directory where this library lives.

Usage:

```
$deviceInfo = new GodsDev\DefaultDeviceConnector\DefaultDeviceConnector(); //may be initiated with non default latest API URL
var_dump($deviceInfo->request());
var_dump($deviceInfo->getMarkup());
```

Method request()
----------------

[](#method-request)

Returns either array with device properties (and sets *$deviceInfo-&gt;properties* to the same value) or returns *false* and puts details into *$deviceInfo-&gt;error*

Note: workaround before default device API can process it directly: 'Device-Stock-UA' takes precedence before 'X-OperaMini-Phone-UA' takes precedence before 'HTTP\_USER\_AGENT'.

Method getMarkup()
------------------

[](#method-getmarkup)

Returns one of strings

- *html5* (which is default even in case of API call error)
- *desktop*
- *xhtml*

Method setCharacteristics(array $characteristics)
-------------------------------------------------

[](#method-setcharacteristicsarray-characteristics)

Sets arbitrarily the values to request the *default device API* with.

'user\_agent' key MUST be present.

'x-wap-profile', 'accept', 'x-operamini-phone-ua', 'device-stock-ua' keys MAY be present.

Method defaultCharacteristics()
-------------------------------

[](#method-defaultcharacteristics)

Populates the values to request the *default device API* with according to the current HTTP headers.

Is called automatically by the *\_\_constructor*.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Every ~9 days

Total

3

Last Release

3775d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2787653?v=4)[GodsDev](/maintainers/GodsDev)[@GodsDev](https://github.com/GodsDev)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/godsdev-default-device-connector/health.svg)

```
[![Health](https://phpackages.com/badges/godsdev-default-device-connector/health.svg)](https://phpackages.com/packages/godsdev-default-device-connector)
```

PHPackages © 2026

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