/**
  * スマートフォンかどうかを判別する。
  *
  * @return boolean
  */
 function isNonSmartphone()
 {
     return !SC_SmartphoneUserAgent_Ex::isSmartphone();
 }
 /**
  * 端末種別を判別する。
  *
  * SC_Display::MOBILE = ガラケー = 1
  * SC_Display::SMARTPHONE = スマホ = 2
  * SC_Display::PC = PC = 10
  *
  * @static
  * @param   $reset  boolean
  * @return integer 端末種別ID
  */
 public static function detectDevice($reset = FALSE)
 {
     if (is_null(SC_Display_Ex::$device) || $reset) {
         $nu = new Net_UserAgent_Mobile();
         $su = new SC_SmartphoneUserAgent_Ex();
         if ($nu->isMobile()) {
             SC_Display_Ex::$device = DEVICE_TYPE_MOBILE;
         } elseif ($su->isSmartphone()) {
             SC_Display_Ex::$device = DEVICE_TYPE_SMARTPHONE;
         } else {
             SC_Display_Ex::$device = DEVICE_TYPE_PC;
         }
     }
     return SC_Display_Ex::$device;
 }
Example #3
0
 /**
  * 機種を判別する。
  *
  * SC_Display::MOBILE = ガラケー = 1
  * SC_Display::SMARTPHONE = スマホ = 2
  * SC_Display::PC = PC = 10
  *
  * @static
  * @return integer 端末種別ID
  */
 function detectDevice()
 {
     $nu = new Net_UserAgent_Mobile();
     $su = new SC_SmartphoneUserAgent_Ex();
     $retDevice = 0;
     if ($nu->isMobile()) {
         return DEVICE_TYPE_MOBILE;
     } elseif ($su->isSmartphone()) {
         return DEVICE_TYPE_SMARTPHONE;
     } else {
         return DEVICE_TYPE_PC;
     }
 }