You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.
$detected is then a class which contains the requested information.
Here is my reasoning:
Many of these things are related, and we could avoid parsing the UA multiple times.
Allows the user to fine-tune what is detected for performance reasons
I have been working on a new parsing system (maybe a different project than this) which uses a single Regex to break down a user-agent into components, and then adds each component to a key/value store for quick lookup by the analysers. This should provide a significant speed boost as we're indexing rather than performing multiple substring searches.
So working with the flags suggestion above, the process could be like:
Call BrowserDetector::detect($flags = DETECT_ALL)
BrowserDetector splits and indexes the UA into a key/value store
BrowserDetector creates a new object based on some Results class
For each DETECT_ flag, if required, BrowserDetector passes the key/value and Results (byref) objects into each relevant detection class
Results object is modified by each detection class and is eventually returned from the detect function
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It would be easier to have a static API to use. Something like this:
The text was updated successfully, but these errors were encountered: