當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UniteFunctionsRev::validateNumeric方法代碼示例

本文整理匯總了PHP中UniteFunctionsRev::validateNumeric方法的典型用法代碼示例。如果您正苦於以下問題:PHP UniteFunctionsRev::validateNumeric方法的具體用法?PHP UniteFunctionsRev::validateNumeric怎麽用?PHP UniteFunctionsRev::validateNumeric使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UniteFunctionsRev的用法示例。


在下文中一共展示了UniteFunctionsRev::validateNumeric方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: initByID

 /**
  * 
  * init the slider by id
  */
 public function initByID($slideid)
 {
     UniteFunctionsRev::validateNumeric($slideid, "Slide ID");
     $slideid = $this->db->escape($slideid);
     $record = $this->db->fetchSingle(GlobalsRevSlider::$table_slides, "id={$slideid}");
     $this->initByData($record);
 }
開發者ID:nimishavyas,項目名稱:proiti,代碼行數:11,代碼來源:revslider_slide.class.php

示例2: initByID

 /**
  * 
  * init the slider object by database id
  */
 public function initByID($sliderID)
 {
     UniteFunctionsRev::validateNumeric($sliderID, "Slider ID");
     $sliderID = $this->db->escape($sliderID);
     $sliderData = $this->db->fetchSingle(GlobalsRevSlider::$table_sliders, "id={$sliderID}");
     $this->initByDBData($sliderData);
 }
開發者ID:rohichurch,項目名稱:rohichurch-wp,代碼行數:11,代碼來源:revslider_slider.class.php

示例3: initByID

 /**
  * 
  * init the slider object by database id
  */
 public function initByID($sliderID)
 {
     UniteFunctionsRev::validateNumeric($sliderID, "Slider ID");
     $sliderID = $this->db->escape($sliderID);
     try {
         $sliderData = $this->db->fetchSingle(GlobalsRevSlider::$table_sliders, "id={$sliderID}");
     } catch (Exception $e) {
         UniteFunctionsRev::throwError("Slider with ID: {$sliderID} Not Found");
     }
     $this->initByDBData($sliderData);
 }
開發者ID:ConceptHaus,項目名稱:huasca,代碼行數:15,代碼來源:revslider_slider.class.php

示例4: GetSliderImgSettings

 public function GetSliderImgSettings($sliderID)
 {
     UniteFunctionsRev::validateNumeric($sliderID, "Slider ID");
     $sliderID = $this->db->escape($sliderID);
     try {
         $sliderData = $this->db->fetchSingle(GlobalsRevSlider::$table_sliders, "id={$sliderID}");
     } catch (Exception $e) {
         UniteFunctionsRev::throwError("Slider with ID: {$sliderID} Not Found");
     }
     return json_decode($sliderData['params'])->prd_img_size;
 }
開發者ID:evgrishin,項目名稱:se1614,代碼行數:11,代碼來源:revslider_slider.class.php

示例5: handleImageEffects

 private function handleImageEffects(&$imgHandle)
 {
     if (empty($this->effect)) {
         return false;
     }
     switch ($this->effect) {
         case self::EFFECT_BW:
             if (defined("IMG_FILTER_GRAYSCALE")) {
                 imagefilter($imgHandle, IMG_FILTER_GRAYSCALE);
             }
             break;
         case self::EFFECT_BRIGHTNESS:
             if (defined("IMG_FILTER_BRIGHTNESS")) {
                 if (!is_numeric($this->effect_arg1)) {
                     $this->effect_arg1 = 50;
                 }
                 //set default value
                 UniteFunctionsRev::validateNumeric($this->effect_arg1, "'ea1' argument");
                 imagefilter($imgHandle, IMG_FILTER_BRIGHTNESS, $this->effect_arg1);
             }
             break;
         case self::EFFECT_CONTRAST:
             if (defined("IMG_FILTER_CONTRAST")) {
                 if (!is_numeric($this->effect_arg1)) {
                     $this->effect_arg1 = -5;
                 }
                 //set default value
                 imagefilter($imgHandle, IMG_FILTER_CONTRAST, $this->effect_arg1);
             }
             break;
         case self::EFFECT_EDGE:
             if (defined("IMG_FILTER_EDGEDETECT")) {
                 imagefilter($imgHandle, IMG_FILTER_EDGEDETECT);
             }
             break;
         case self::EFFECT_EMBOSS:
             if (defined("IMG_FILTER_EMBOSS")) {
                 imagefilter($imgHandle, IMG_FILTER_EMBOSS);
             }
             break;
         case self::EFFECT_BLUR:
             if (defined("IMG_FILTER_GAUSSIAN_BLUR")) {
                 imagefilter($imgHandle, IMG_FILTER_GAUSSIAN_BLUR);
             }
             break;
         case self::EFFECT_MEAN:
             if (defined("IMG_FILTER_MEAN_REMOVAL")) {
                 imagefilter($imgHandle, IMG_FILTER_MEAN_REMOVAL);
             }
             break;
         case self::EFFECT_SMOOTH:
             if (defined("IMG_FILTER_SMOOTH")) {
                 if (!is_numeric($this->effect_arg1)) {
                     $this->effect_arg1 = 15;
                 }
                 //set default value
                 imagefilter($imgHandle, IMG_FILTER_SMOOTH, $this->effect_arg1);
             }
             break;
         default:
             $this->throwError("Effect not supported: <b>{$this->effect}</b>");
             break;
     }
 }
開發者ID:jehanryan,項目名稱:Flotech,代碼行數:64,代碼來源:image_view.class.php

示例6: getStaticSlideID

 /**
  * 
  * getStaticSlide
  */
 public function getStaticSlideID($sliderID)
 {
     UniteFunctionsRev::validateNumeric($sliderID, "Slider ID");
     $sliderID = $this->db->escape($sliderID);
     $record = $this->db->fetch(GlobalsRevSlider::$table_static_slides, "slider_id={$sliderID}");
     if (empty($record)) {
         return false;
     } else {
         return $record[0]['id'];
     }
 }
開發者ID:TeamCodeStudio,項目名稱:fpmoz,代碼行數:15,代碼來源:revslider_slide.class.php

示例7: GetSliderImgSettings

 public function GetSliderImgSettings($sliderID)
 {
     $img_arr = array();
     UniteFunctionsRev::validateNumeric($sliderID, "Slider ID");
     $sliderID = $this->db->escape($sliderID);
     try {
         $sliderData = $this->db->fetchSingle(GlobalsRevSlider::$table_sliders, "id={$sliderID}");
     } catch (Exception $e) {
         UniteFunctionsRev::throwError("Slider with ID: {$sliderID} Not Found");
     }
     $sliderData = json_decode($sliderData['params']);
     $img_arr['width'] = isset($sliderData->prd_img_width) ? $sliderData->prd_img_width : '880';
     $img_arr['height'] = isset($sliderData->prd_img_height) ? $sliderData->prd_img_height : '350';
     return $img_arr;
 }
開發者ID:rinodung,項目名稱:opencart-15x-flat-admin,代碼行數:15,代碼來源:revslider_slider.class.php


注:本文中的UniteFunctionsRev::validateNumeric方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。