public function addCustomBrowserDetection($browserName, $uaNameToLookFor = '', $isMobile = false, $isRobot = false, $separator = '/', $uaNameFindWords = true)
    {
        if ($browserName == '') {
            return false;
        }
        if (array_key_exists($browserName, $this->_customBrowserDetection)) {
            unset($this->_customBrowserDetection[$browserName]);
        }
        if ($uaNameToLookFor == '') {
            $uaNameToLookFor = $browserName;
        }
        $this->_customBrowserDetection[$browserName] = array('uaNameToLookFor' => $uaNameToLookFor, 'isMobile' => $isMobile == true, 'isRobot' => $isRobot == true,
                                                             'separator' => $separator, 'uaNameFindWords' => $uaNameFindWords == true);
        return true;
    }
public function addCustomBrowserDetection($browserName, $uaNameToLookFor = '', $isMobile = false, $isRobot = false, $separator = '/', $uaNameFindWords = true)
    {
        if ($browserName == '') {
            return false;
        }
        if (array_key_exists($browserName, $this->_customBrowserDetection)) {
            unset($this->_customBrowserDetection[$browserName]);
        }
        if ($uaNameToLookFor == '') {
            $uaNameToLookFor = $browserName;
        }
        $this->_customBrowserDetection[$browserName] = array('uaNameToLookFor' => $uaNameToLookFor, 'isMobile' => $isMobile == true, 'isRobot' => $isRobot == true,
                                                             'separator' => $separator, 'uaNameFindWords' => $uaNameFindWords == true);
        return true;
    }
public function addCustomBrowserDetection ( $ browserName , $ uaNameToLookFor = '' , $ isMobile = false , $ isRobot = false , $ separator = '/' , $ uaNameFindWords = true ) { if ( $ browserName == '' ) { return false ; } if ( array_key_exists ( $ browserName , $ this -> _customBrowserDetection ) ) { unset ( $ this -> _customBrowserDetection [ $ browserName ] ) ; } if ( $ uaNameToLookFor == '' ) { $ uaNameToLookFor = $ browserName ; } $ this -> _customBrowserDetection [ $ browserName ] = array ( 'uaNameToLookFor' => $ uaNameToLookFor , 'isMobile' => $ isMobile == true , 'isRobot' => $ isRobot == true , 'separator' => $ separator , 'uaNameFindWords' => $ uaNameFindWords == true ) ; return true ; }
Dynamically add support for a new Web browser.
@param string $browserName The Web browser name (used for display).
@param mixed $uaNameToLookFor (optional) The string (or array of strings) representing the browser name to find
in the user agent. If omitted, $browserName will be used.
@param boolean $isMobile (optional) Determines if the browser is from a mobile device.
@param boolean $isRobot (optional) Determines if the browser is a robot or not.
@param string $separator (optional) The separator string used to split the browser name and the version number in
the user agent.
@param boolean $uaNameFindWords (optional) Determines if the browser name to find should match a word instead of
a part of a word. For example "Bar" would not be found in "FooBar" when true but would be found in "Foo Bar".
When set to false, the browser name can be found anywhere in the user agent string.
@see removeCustomBrowserDetection()
@return boolean Returns true if the custom rule has been added, false otherwise.
Dynamically add support for a new Web browser .