private function _lookupLocal($ua, $defaultGrade)
    {
        $logger = $GLOBALS['logger'];
        $browser = new Browser();
        $gradePrefix = 'X';
        $gradeSuffix = Grades::UNSUPPORTED;

        if (($ua->isMobile || $ua->isMobileDevice) && $ua->isTablet) {
            $gradePrefix = DeviceTypes::TABLET;
            $gradeSuffix == Grades::_001;
        } else if (($ua->isMobile || $ua->isMobileDevice)) {
            $gradePrefix = DeviceTypes::MOBILE;
            //$logger->info(print_r($ua->os." : ".$ua->osMajor.$ua->osMinor,1));
            switch($ua->os) {
            case "Android" :
                if (intval($ua->osMajor) >= 4) {
                    $gradeSuffix = Grades::_201;
                } else {
                    $gradeSuffix = Grades::_210;
                }
                break;
            case "iOS" :
                if (intval($ua->osMajor) >= 4 && intval($ua->osMinor >= 2)) {
                    $gradeSuffix = Grades::_101;
                } else {
                    $gradeSuffix = Grades::_110;
                }
                break;
            case "Windows Phone" :
                if (intval($ua->osMajor) >= 8) {
                    $gradeSuffix = Grades::_301;
                } else if (intval($ua->osMajor) >= 7 && intval($ua->osMinor) >= 5) {
                    $gradeSuffix = Grades::_320;
                } 
                break;
            default :
                $gradeSuffix = Grades::_400;
                break;
            }
        } else {
            $gradePrefix = DeviceTypes::DESKTOP;
            $gradeSuffix = Grades::_001;
        }
        $browser->setGrade($gradePrefix.$gradeSuffix);
        return $browser;
    }
private function _lookupLocal($ua, $defaultGrade)
    {
        $logger = $GLOBALS['logger'];
        $browser = new Browser();
        $gradePrefix = 'X';
        $gradeSuffix = Grades::UNSUPPORTED;

        if (($ua->isMobile || $ua->isMobileDevice) && $ua->isTablet) {
            $gradePrefix = DeviceTypes::TABLET;
            $gradeSuffix == Grades::_001;
        } else if (($ua->isMobile || $ua->isMobileDevice)) {
            $gradePrefix = DeviceTypes::MOBILE;
            //$logger->info(print_r($ua->os." : ".$ua->osMajor.$ua->osMinor,1));
            switch($ua->os) {
            case "Android" :
                if (intval($ua->osMajor) >= 4) {
                    $gradeSuffix = Grades::_201;
                } else {
                    $gradeSuffix = Grades::_210;
                }
                break;
            case "iOS" :
                if (intval($ua->osMajor) >= 4 && intval($ua->osMinor >= 2)) {
                    $gradeSuffix = Grades::_101;
                } else {
                    $gradeSuffix = Grades::_110;
                }
                break;
            case "Windows Phone" :
                if (intval($ua->osMajor) >= 8) {
                    $gradeSuffix = Grades::_301;
                } else if (intval($ua->osMajor) >= 7 && intval($ua->osMinor) >= 5) {
                    $gradeSuffix = Grades::_320;
                } 
                break;
            default :
                $gradeSuffix = Grades::_400;
                break;
            }
        } else {
            $gradePrefix = DeviceTypes::DESKTOP;
            $gradeSuffix = Grades::_001;
        }
        $browser->setGrade($gradePrefix.$gradeSuffix);
        return $browser;
    }
private function _lookupLocal ( $ ua , $ defaultGrade ) { $ logger = $ GLOBALS [ 'logger' ] ; $ browser = new Browser ( ) ; $ gradePrefix = 'X' ; $ gradeSuffix = Grades :: UNSUPPORTED ; if ( ( $ ua -> isMobile || $ ua -> isMobileDevice ) && $ ua -> isTablet ) { $ gradePrefix = DeviceTypes :: TABLET ; $ gradeSuffix == Grades :: _001 ; } else if ( ( $ ua -> isMobile || $ ua -> isMobileDevice ) ) { $ gradePrefix = DeviceTypes :: MOBILE ; //$logger->info(print_r($ua->os." : ".$ua->osMajor.$ua->osMinor,1)); switch ( $ ua -> os ) { case "Android" : if ( intval ( $ ua -> osMajor ) >= 4 ) { $ gradeSuffix = Grades :: _201 ; } else { $ gradeSuffix = Grades :: _210 ; } break ; case "iOS" : if ( intval ( $ ua -> osMajor ) >= 4 && intval ( $ ua -> osMinor >= 2 ) ) { $ gradeSuffix = Grades :: _101 ; } else { $ gradeSuffix = Grades :: _110 ; } break ; case "Windows Phone" : if ( intval ( $ ua -> osMajor ) >= 8 ) { $ gradeSuffix = Grades :: _301 ; } else if ( intval ( $ ua -> osMajor ) >= 7 && intval ( $ ua -> osMinor ) >= 5 ) { $ gradeSuffix = Grades :: _320 ; } break ; default : $ gradeSuffix = Grades :: _400 ; break ; } } else { $ gradePrefix = DeviceTypes :: DESKTOP ; $ gradeSuffix = Grades :: _001 ; } $ browser -> setGrade ( $ gradePrefix . $ gradeSuffix ) ; return $ browser ; }
Lookup Device Detection based on File.

@param mixed $ua The user agent.

@access private
@return void
Lookup Device Detection based on File .