Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new feature: check for a specify device #4

Closed
pharmaline opened this issue Sep 19, 2012 · 1 comment
Closed

new feature: check for a specify device #4

pharmaline opened this issue Sep 19, 2012 · 1 comment
Assignees

Comments

@pharmaline
Copy link

reference to the comment on http://code.google.com/p/php-mobile-detect/wiki/Mobile_Detect from [email protected]:

i want to check for HTC Desire Devices, so i thought calling $detect->isDesire(); would give me in public function call() the key "isDesire" or in detect(). But it does not. Is there a way to use such a function or to create such a key?

greatings

linxpinx ;-)

@ghost ghost assigned serbanghita Sep 19, 2012
@serbanghita
Copy link
Owner

Ok you can do this with the newly added $detect->match() method.

$isDesire = $detect->match('Android.*(Desire|ADR6200|001HT|HTCA8180|A320e)|HTC.*Desire|Desire([\w ]+)?HD|Desire([\w ]+)?S|Desire([\w ]+)?C|HTC_GOF_U');

Download the latest version for some tests. Also check the diffs 54ab88f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants