/**
  * Creates Generic Request from the given HTTP Request (normally $_SERVER)
  * @param array $request HTTP Request
  * @param bool $override_sideloaded_browser_ua
  * @return WURFL_Request_GenericRequest
  */
 public function createRequest($request, $override_sideloaded_browser_ua = true)
 {
     $userAgent = WURFL_WURFLUtils::getUserAgent($request, $override_sideloaded_browser_ua);
     $userAgentProfile = WURFL_WURFLUtils::getUserAgentProfile($request);
     $isXhtmlDevice = WURFL_WURFLUtils::isXhtmlRequester($request);
     return new WURFL_Request_GenericRequest($request, $userAgent, $userAgentProfile, $isXhtmlDevice);
 }
 /**
  * Creates Generic Request from the given HTTP Request (normally $_SERVER)
  * @param array $request HTTP Request
  * @return WURFL_Request_GenericRequest
  */
 public function createRequest($request)
 {
     $userAgent = WURFL_WURFLUtils::getUserAgent($request);
     $userAgentProfile = WURFL_WURFLUtils::getUserAgentProfile($request);
     $isXhtmlDevice = WURFL_WURFLUtils::isXhtmlRequester($request);
     return new WURFL_Request_GenericRequest($userAgent, $userAgentProfile, $isXhtmlDevice);
 }
示例#3
0
 /**
  * Creates GenericRequest Object from
  * a $_SERVER object
  *
  * @param $_SERVER $request
  * @return GenericRequest
  */
 public function createRequest($request)
 {
     $userAgent = WURFL_WURFLUtils::getUserAgent($request);
     $this->checkUserAgent($userAgent);
     $userAgent = $this->_userAgentNormalizer->normalize($userAgent);
     $userAgentProfile = WURFL_WURFLUtils::getUserAgentProfile($request);
     $isXhtmlDevice = WURFL_WURFLUtils::isXhtmlRequester($request);
     return new WURFL_Request_GenericRequest($userAgent, $userAgentProfile, $isXhtmlDevice);
 }