/** * Attempts to match given user agent string to a device from the database by comparing less and less of the strings until a match is found (RIS, Reduction in String) * @param String User agent * @param int Tolerance, how many characters must match from left to right * @return String WURFL ID */ public function risMatch($ua, $tolerance) { if ($this->wurfl->db->db_implements_ris) { return $this->wurfl->db->getDeviceFromUA_RIS($ua, $tolerance, $this); } $this->updateDeviceList(); return UserAgentUtils::risMatch($ua, $tolerance, $this); }
/** * Attempts to match given user agent string to a device from the database by comparing less and less of the strings until a match is found (RIS, Reduction in String) * @param int $tolerance Tolerance, how many characters must match from left to right * @return string WURFL ID */ public function risMatch($tolerance) { if ($this->simulation) { return WurflConstants::NO_MATCH; } if ($this->wurfl->db->db_implements_ris) { return $this->wurfl->db->getDeviceFromUA_RIS($this->userAgent->normalized, $tolerance, $this); } $this->updateDeviceList(); return UserAgentUtils::risMatch($this->userAgent->normalized, $tolerance, $this); }