public function cleanUserAgentString($userAgentString)
  {
    // clean up the string
    $userAgentString = trim(strtolower($userAgentString));

    // replace browser names with their aliases
    $userAgentString = strtr($userAgentString, $this->getKnownBrowserAliases());

    // replace operating system names with their aliases
    $userAgentString = strtr($userAgentString, $this->getKnownOperatingSystemAliases());

    // replace engine names with their aliases
    $userAgentString = strtr($userAgentString, $this->getKnownEngineAliases());

    return $userAgentString;
  }
public function cleanUserAgentString($userAgentString)
  {
    // clean up the string
    $userAgentString = trim(strtolower($userAgentString));

    // replace browser names with their aliases
    $userAgentString = strtr($userAgentString, $this->getKnownBrowserAliases());

    // replace operating system names with their aliases
    $userAgentString = strtr($userAgentString, $this->getKnownOperatingSystemAliases());

    // replace engine names with their aliases
    $userAgentString = strtr($userAgentString, $this->getKnownEngineAliases());

    return $userAgentString;
  }
public function cleanUserAgentString ( $ userAgentString ) { // clean up the string $ userAgentString = trim ( strtolower ( $ userAgentString ) ) ; // replace browser names with their aliases $ userAgentString = strtr ( $ userAgentString , $ this -> getKnownBrowserAliases ( ) ) ; // replace operating system names with their aliases $ userAgentString = strtr ( $ userAgentString , $ this -> getKnownOperatingSystemAliases ( ) ) ; // replace engine names with their aliases $ userAgentString = strtr ( $ userAgentString , $ this -> getKnownEngineAliases ( ) ) ; return $ userAgentString ; }
Make user agent string lowercase, and replace browser aliases

@param   string $userAgentString the dirty user agent string
@return  string                  the clean user agent string
Make user agent string lowercase and replace browser aliases