Oihana PHP System

UserAgentInfoTrait

Property name constants for `xyz\oihana\schema\http\UserAgentInfo`.

Centralises the attribute keys exposed by the DTO so consumers do not have to sprinkle magic strings across their code.

Tags
category

HTTP

author

Marc Alcaraz (ekameleon)

Table of Contents

Constants

BROWSER  : string = 'browser'
The browser product name (e.g. `'Chrome'`, `'Firefox'`, `'Safari'`, `'Edge'`). `null` when no browser could be identified.
BROWSER_VERSION  : string = 'browserVersion'
The browser product version as a free-form string (e.g. `'126.0.6478.127'`). `null` when not extracted.
DEVICE_TYPE  : string = 'deviceType'
The coarse-grained device classification — one of the `xyz\oihana\schema\constants\http\DeviceType` constants.
IS_BOT  : string = 'isBot'
Whether the User-Agent was identified as belonging to a bot, crawler or other automated agent.
OS  : string = 'os'
The operating system name (e.g. `'Windows'`, `'macOS'`, `'Linux'`, `'Android'`, `'iOS'`). `null` when no OS could be identified.
OS_VERSION  : string = 'osVersion'
The operating system version as a free-form string (e.g. `'10'`, `'14.5'`). `null` when not extracted.
RAW  : string = 'raw'
The original `User-Agent` request header value, preserved verbatim for audit and forensics.

Constants

BROWSER

The browser product name (e.g. `'Chrome'`, `'Firefox'`, `'Safari'`, `'Edge'`). `null` when no browser could be identified.

public string BROWSER = 'browser'

BROWSER_VERSION

The browser product version as a free-form string (e.g. `'126.0.6478.127'`). `null` when not extracted.

public string BROWSER_VERSION = 'browserVersion'

DEVICE_TYPE

The coarse-grained device classification — one of the `xyz\oihana\schema\constants\http\DeviceType` constants.

public string DEVICE_TYPE = 'deviceType'

IS_BOT

Whether the User-Agent was identified as belonging to a bot, crawler or other automated agent.

public string IS_BOT = 'isBot'

OS

The operating system name (e.g. `'Windows'`, `'macOS'`, `'Linux'`, `'Android'`, `'iOS'`). `null` when no OS could be identified.

public string OS = 'os'

OS_VERSION

The operating system version as a free-form string (e.g. `'10'`, `'14.5'`). `null` when not extracted.

public string OS_VERSION = 'osVersion'

RAW

The original `User-Agent` request header value, preserved verbatim for audit and forensics.

public string RAW = 'raw'
On this page

Search results