Пример #1
0
 static function identify($type, $model)
 {
     require_once _BASEPATH_ . '../data/models-' . $type . '.php';
     switch ($type) {
         case 'android':
             return DeviceModels::identifyAndroid($model);
         case 'asha':
             return DeviceModels::identifyList(DeviceModels::$ASHA_MODELS, $model);
         case 'bada':
             return DeviceModels::identifyList(DeviceModels::$BADA_MODELS, $model);
         case 'blackberry':
             return DeviceModels::identifyBlackBerry($model);
         case 'brew':
             return DeviceModels::identifyList(DeviceModels::$BREW_MODELS, $model);
         case 'firefoxos':
             return DeviceModels::identifyList(DeviceModels::$FIREFOXOS_MODELS, $model, false);
         case 'ios':
             return DeviceModels::identifyIOS($model);
         case 'tizen':
             return DeviceModels::identifyList(DeviceModels::$TIZEN_MODELS, $model);
         case 'touchwiz':
             return DeviceModels::identifyList(DeviceModels::$TOUCHWIZ_MODELS, $model);
         case 'wm':
             return DeviceModels::identifyList(DeviceModels::$WINDOWS_MOBILE_MODELS, $model);
         case 'wp':
             return DeviceModels::identifyList(DeviceModels::$WINDOWS_PHONE_MODELS, $model);
         case 's30':
             return DeviceModels::identifyList(DeviceModels::$S30_MODELS, $model);
         case 's40':
             return DeviceModels::identifyList(DeviceModels::$S40_MODELS, $model);
         case 's60':
             return DeviceModels::identifyList(DeviceModels::$S60_MODELS, $model);
         case 'palmos':
             return DeviceModels::identifyList(DeviceModels::$PALMOS_MODELS, $model);
         case 'feature':
             return DeviceModels::identifyList(DeviceModels::$FEATURE_MODELS, $model);
     }
     return (object) array('type' => '', 'model' => $model, 'identified' => ID_NONE);
 }