public function addCustomPlatformDetection($platformName, $platformNameToLookFor = '', $isMobile = false)
    {
        if ($platformName == '') {
            return false;
        }
        if (array_key_exists($platformName, $this->_customPlatformDetection)) {
            unset($this->_customPlatformDetection[$platformName]);
        }
        if ($platformNameToLookFor == '') {
            $platformNameToLookFor = $platformName;
        }
        $this->_customPlatformDetection[$platformName] = array('platformNameToLookFor' => $platformNameToLookFor, 'isMobile' => $isMobile == true);
        return true;
    }
public function addCustomPlatformDetection($platformName, $platformNameToLookFor = '', $isMobile = false)
    {
        if ($platformName == '') {
            return false;
        }
        if (array_key_exists($platformName, $this->_customPlatformDetection)) {
            unset($this->_customPlatformDetection[$platformName]);
        }
        if ($platformNameToLookFor == '') {
            $platformNameToLookFor = $platformName;
        }
        $this->_customPlatformDetection[$platformName] = array('platformNameToLookFor' => $platformNameToLookFor, 'isMobile' => $isMobile == true);
        return true;
    }
public function addCustomPlatformDetection ( $ platformName , $ platformNameToLookFor = '' , $ isMobile = false ) { if ( $ platformName == '' ) { return false ; } if ( array_key_exists ( $ platformName , $ this -> _customPlatformDetection ) ) { unset ( $ this -> _customPlatformDetection [ $ platformName ] ) ; } if ( $ platformNameToLookFor == '' ) { $ platformNameToLookFor = $ platformName ; } $ this -> _customPlatformDetection [ $ platformName ] = array ( 'platformNameToLookFor' => $ platformNameToLookFor , 'isMobile' => $ isMobile == true ) ; return true ; }
Dynamically add support for a new platform.
@param string $platformName The platform name (used for display).
@param mixed $platformNameToLookFor (optional) The string (or array of strings) representing the platform name to
find in the user agent. If omitted, $platformName will be used.
@param boolean $isMobile (optional) Determines if the platform is from a mobile device.
@see removeCustomPlatformDetection()
@return boolean Returns true if the custom rule has been added, false otherwise.
Dynamically add support for a new platform .