You are here

public function purl_useragent::parse in Persistent URL 6

Same name and namespace in other branches
  1. 7 includes/purl_useragent.inc \purl_useragent::parse()

See a valid value is present in the HTTP_USER_AGENT. Note: we're using stripos() which makes this check relatively easy to pass..

Overrides purl_processor::parse

File

includes/purl_useragent.inc, line 29

Class

purl_useragent
User agent style.

Code

public function parse($valid_values, $useragent) {
  foreach ($valid_values as $key => $value) {
    if (stripos($useragent, $key) !== FALSE) {
      return purl_path_elements($this, $valid_values);
    }
  }
}