{"id":15026794,"url":"https://github.com/mimmi20/ua-result","last_synced_at":"2025-10-29T04:30:35.282Z","repository":{"id":1756302,"uuid":"44045429","full_name":"mimmi20/ua-result","owner":"mimmi20","description":"A class to build a useragent detector result independed from the detector","archived":false,"fork":false,"pushed_at":"2025-02-13T04:26:39.000Z","size":624,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T05:25:12.650Z","etag":null,"topics":["php83"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mimmi20.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-11T08:57:57.000Z","updated_at":"2025-02-13T04:26:43.000Z","dependencies_parsed_at":"2025-02-05T18:40:02.674Z","dependency_job_id":"91c19797-4147-4a96-894d-22a879ca5090","html_url":"https://github.com/mimmi20/ua-result","commit_stats":{"total_commits":402,"total_committers":6,"mean_commits":67.0,"dds":0.5398009950248757,"last_synced_commit":"ad69dc952726b327170878a931c613a2da975cf9"},"previous_names":[],"tags_count":81,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimmi20%2Fua-result","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimmi20%2Fua-result/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimmi20%2Fua-result/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimmi20%2Fua-result/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mimmi20","download_url":"https://codeload.github.com/mimmi20/ua-result/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238602745,"owners_count":19499460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php83"],"created_at":"2024-09-24T20:05:06.656Z","updated_at":"2025-10-29T04:30:29.982Z","avatar_url":"https://github.com/mimmi20.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Useragent Detector Result\n\n[![Latest Stable Version](https://poser.pugx.org/mimmi20/ua-result/v/stable?format=flat-square)](https://packagist.org/packages/mimmi20/ua-result)\n[![Latest Unstable Version](https://poser.pugx.org/mimmi20/ua-result/v/unstable?format=flat-square)](https://packagist.org/packages/mimmi20/ua-result)\n[![License](https://poser.pugx.org/mimmi20/ua-result/license?format=flat-square)](https://packagist.org/packages/mimmi20/ua-result)\n\n## Code Status\n\n[![codecov](https://codecov.io/gh/mimmi20/ua-result/branch/master/graph/badge.svg)](https://codecov.io/gh/mimmi20/ua-result)\n[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/mimmi20/ua-result.svg)](https://isitmaintained.com/project/mimmi20/ua-result \"Average time to resolve an issue\")\n[![Percentage of issues still open](https://isitmaintained.com/badge/open/mimmi20/ua-result.svg)](https://isitmaintained.com/project/mimmi20/ua-result \"Percentage of issues still open\")\n\n## Description\n\nThis library provides a set of classes representing a result of an useragent detection.\n\n## Requirements\n\nThis library requires PHP 7.4+.\nAlso a PSR-3 compatible logger is required.\n\n## Installation\n\nRun the command below to install via Composer\n\n```shell\ncomposer require mimmi20/ua-result\n```\n\n## The result object\n\nThe result object is the main object and contains only other objects.\n\n## The browser object\n\nThe browser object represents the detected browser.\n\n```php\n// get the result by detection or create it\n\n$browser = $result-\u003egetBrowser();\n\n// get the name\n$name = $browser-\u003egetName();\n\n// get the manufaturer\n$manCompany = $browser-\u003egetManufacturer()-\u003egetName();\n$manBrand   = $browser-\u003egetManufacturer()-\u003egetBrandName();\n\n// get the version\n$name = $browser-\u003egetVersion()-\u003egetVersion();\n\n// get the type\n$type  = $browser-\u003egetType()-\u003egetName();\n$isbot = $browser-\u003egetType()-\u003eisBot();\n```\n\n## The engine object\n\nThe engine object represents the detected rendering engine.\n\n```php\n// get the result by detection or create it\n\n$engine = $result-\u003egetEngine();\n\n// get the name\n$name = $engine-\u003egetName();\n\n// get the manufaturer\n$manCompany = $engine-\u003egetManufacturer()-\u003egetName();\n$manBrand   = $engine-\u003egetManufacturer()-\u003egetBrandName();\n\n// get the version\n$name = $engine-\u003egetVersion()-\u003egetVersion();\n```\n\n## The device object\n\nThe device object represents the detected device.\n\n```php\n// get the result by detection or create it\n\n$device = $result-\u003egetDevice();\n\n// get the (code) name\n$name = $device-\u003egetDeviceName();\n// the device may have a different marketing name\n$mname = $device-\u003egetMarketingName();\n\n// get the manufaturer\n$manCompany = $device-\u003egetManufacturer()-\u003egetName();\n$manBrand   = $device-\u003egetManufacturer()-\u003egetBrandName();\n// the device may be a branded version\n$brand = $device-\u003egetBrand()-\u003egetBrandName();\n\n// does the device support dual orientation?\n$dualorien = $device-\u003egetDualOrientation();\n\n// get the pointing method\n$pointing = $device-\u003egetPointingMethod();\n\n// get the display dimensions\n$height = $device-\u003egetResolutionHeight();\n$width  = $device-\u003egetResolutionWidth();\n\n// get some more information about the device type\n$type     = $device-\u003egetType()-\u003egetName();\n$isPhone  = $device-\u003egetType()-\u003eisPhone();\n$isTablet = $device-\u003egetType()-\u003eisTablet();\n```\n\n## The platform object\n\nThe os object represents the detected platform.\n\n```php\n// get the result by detection or create it\n\n$platform = $result-\u003egetOs();\n\n// get the (code) name\n$name  = $platform-\u003egetName();\n// the platform may have a different marketing name\n$mname = $platform-\u003egetMarketingName();\n\n// get the manufaturer\n$manCompany = $platform-\u003egetManufacturer()-\u003egetName();\n$manBrand   = $platform-\u003egetManufacturer()-\u003egetBrandName();\n\n// get the version\n$name = $platform-\u003egetVersion()-\u003egetVersion();\n```\n\n## Issues and feature requests\n\nPlease report your issues and ask for new features on the GitHub Issue Tracker\nat \u003chttps://github.com/mimmi20/ua-result/issues\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimmi20%2Fua-result","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmimmi20%2Fua-result","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimmi20%2Fua-result/lists"}