Lines Matching defs:user_agent
252 * @param string $user_agent the user agent string
258 public function getBrowser($user_agent = null, $return_array = false)
308 if (!isset($user_agent)) {
310 $user_agent = $_SERVER['HTTP_USER_AGENT'];
312 $user_agent = '';
318 if (preg_match($pattern . 'i', $user_agent, $matches)) {
343 $user_agent, // Original useragent
530 foreach ($tmp_user_agents as $i => $user_agent) {
532 if (empty($browsers[$user_agent]['Comment']) || strpos($user_agent, '*') !== false || strpos($user_agent, '?') !== false)
534 $pattern = $this->_pregQuote($user_agent);
551 if (!empty($browsers[$user_agent]['Parent'])) {
552 $parent = $browsers[$user_agent]['Parent'];
554 $browsers[$user_agent]['Parent'] = $parent_key;
559 foreach ($browsers[$user_agent] as $key => $value) {
667 * @param string $user_agent
671 protected function _pregQuote($user_agent)
673 $pattern = preg_quote($user_agent, self::REGEX_DELIMITER);
943 ini_set('user_agent', $this->_getUserAgent());