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


PHP Main::throwException方法代碼示例

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


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

示例1: __construct

 function __construct($info = NULL)
 {
     if (!isset($info)) {
         $this->info['name'] = NULL;
         $this->info['details'] = NULL;
         $this->info['cli'] = NULL;
         $this->info['soil'] = NULL;
         $this->info['crops'] = NULL;
         $this->info['landuse'] = NULL;
         $this->info['geo_area'] = NULL;
         $this->info['land_forest'] = NULL;
         $this->info['land_sown'] = NULL;
         $this->info['well_irrigated_area'] = NULL;
         $this->info['tank_irrigated_area'] = NULL;
         $this->info['canal_irrigated_area'] = NULL;
         $this->info['other_irrigated_area'] = NULL;
         $this->info['net_irrigated_area'] = NULL;
         $this->info['gross_irrigated_area'] = NULL;
         $this->info['district'] = NULL;
         $this->info['type'] = NULL;
         $this->formName = 'locationAddForm';
         $this->legend = 'Add Location';
         $this->section = 'Add';
     } else {
         if (empty($info)) {
             Main::throwException('Internal Error Occured', 0, 'Failed To Load Data');
         } else {
             $this->info = $info;
             $this->formName = 'locationUpdateForm';
             $this->legend = 'Update Location';
             $this->section = 'Update';
         }
     }
     $this->hdrcnt = "{$this->section} Location";
 }
開發者ID:amigozgovi,項目名稱:agrotech,代碼行數:35,代碼來源:LocationData.php

示例2: getDetails

 function getDetails($table, $data = '*', $cond = NULL, $list = FALSE, $exact = FALSE)
 {
     if (Main::$con == FALSE) {
         Main::openConnection();
         $this->newCon = TRUE;
     }
     $data = Main::escape($data);
     $query = Main::generateQuery('SELECT', $data, $table, $cond);
     //echo $query;
     if ($query) {
         $result = mysql_query($query) or Main::throwException('Internal Error Occured', 0, 'Query Failed ' . $query . " " . mysql_error());
         if (mysql_num_rows($result) > 0) {
             $data = array();
             while ($row = mysql_fetch_assoc($result)) {
                 if (!$list) {
                     $data[] = $row;
                 } else {
                     foreach ($row as $key => $value) {
                         $data[] = $value;
                     }
                 }
             }
             return $data;
         } else {
             return array();
         }
     } else {
         echo "Query Not Found";
     }
 }
開發者ID:amigozgovi,項目名稱:agrotech,代碼行數:30,代碼來源:Details.php

示例3: __construct

 function __construct($data, $table, $cond)
 {
     if (Main::$con == FALSE) {
         Main::openConnection();
         $this->newCon = TRUE;
     }
     $data = Main::escape($data);
     $query = Main::generateQuery('UPDATE', $data, $table, $cond);
     mysql_query($query) or Main::throwException('Internal Error Occured', 0, 'Query Failed' . mysql_error());
     //Main::displaySuccess('DataBase Updated Successfully');
 }
開發者ID:amigozgovi,項目名稱:agrotech,代碼行數:11,代碼來源:Update.php

示例4: __construct

 function __construct($info = NULL)
 {
     if (!isset($info)) {
         $this->info['name'] = NULL;
         $this->info['details'] = NULL;
         $this->formName = 'cropTypeAddForm';
         $this->legend = 'Add Crop Type';
         $this->section = 'Add';
         $this->hdrcnt = '$this->section Crop Types';
     } else {
         if (empty($info)) {
             Main::throwException('Internal Error Occured', 0, 'Failed To Load Data');
         } else {
             $this->info = $info;
             $this->formName = 'cropTypeUpdateForm';
             $this->legend = 'Update Crop Type';
             $this->section = 'Update';
         }
     }
 }
開發者ID:amigozgovi,項目名稱:agrotech,代碼行數:20,代碼來源:CropTypeData.php

示例5: __construct

 function __construct($info = NULL)
 {
     if (!isset($info)) {
         $this->info['news'] = NULL;
         $this->info['date'] = NULL;
         $this->info['time'] = NULL;
         $this->formName = 'newsAddForm';
         $this->legend = 'Add News';
         $this->section = 'Add';
     } else {
         if (empty($info)) {
             Main::throwException('Internal Error Occured', 0, 'Failed To Load Data');
         } else {
             $this->info = $info;
             $this->formName = 'newsUpdateForm';
             $this->legend = 'Update News';
             $this->section = 'Update';
         }
     }
     $this->hdrcnt = "{$this->section} News";
 }
開發者ID:amigozgovi,項目名稱:agrotech,代碼行數:21,代碼來源:NewsData.php

示例6: __construct

 function __construct($info = NULL)
 {
     if (!isset($info)) {
         $this->info['year'] = NULL;
         $this->info['activity'] = NULL;
         $this->info['location'] = NULL;
         $this->formName = 'prevActivityAddForm';
         $this->legend = 'Add PrevActivity';
         $this->section = 'Add';
         $this->info['update'] = 'NULL';
     } else {
         if (empty($info)) {
             Main::throwException('Internal Error Occured', 0, 'Failed To Load Data');
         } else {
             $this->info = $info;
             $this->formName = 'prevActivityUpdateForm';
             $this->legend = 'Update PrevActivity';
             $this->section = 'Update';
         }
     }
     $this->hdrcnt = "{$this->section} Previous Year Activity";
 }
開發者ID:amigozgovi,項目名稱:agrotech,代碼行數:22,代碼來源:PrevActivityData.php

示例7: __construct

 function __construct($info = NULL)
 {
     if (!isset($info)) {
         $this->info['level'] = NULL;
         $this->info['name'] = NULL;
         $this->info['details'] = NULL;
         $this->info['year'] = NULL;
         $this->formName = 'awardAddForm';
         $this->legend = 'Add Award';
         $this->section = 'Add';
     } else {
         if (empty($info)) {
             Main::throwException('Internal Error Occured', 0, 'Failed To Load Data');
         } else {
             $this->info = $info;
             $this->formName = 'awardUpdateForm';
             $this->legend = 'Update Award';
             $this->section = 'Update';
         }
     }
     $this->hdrcnt = "{$this->section} Award";
 }
開發者ID:amigozgovi,項目名稱:agrotech,代碼行數:22,代碼來源:AwardsData.php

示例8: __construct

 function __construct($info = NULL)
 {
     if (!isset($info)) {
         $this->info['from'] = NULL;
         $this->info['sub'] = NULL;
         $this->info['msg'] = NULL;
         $this->info['date'] = NULL;
         $this->info['time'] = NULL;
         $this->formName = 'messageAddForm';
         $this->legend = 'Add Message';
         $this->section = 'Add';
     } else {
         if (empty($info)) {
             Main::throwException('Internal Error Occured', 0, 'Failed To Load Data');
         } else {
             $this->info = $info;
             $this->formName = 'messageUpdateForm';
             $this->legend = 'Update Message';
             $this->section = 'Update';
         }
     }
     $this->data();
 }
開發者ID:amigozgovi,項目名稱:agrotech,代碼行數:23,代碼來源:MessageData.php

示例9: __construct

 function __construct($info = NULL)
 {
     if (!isset($info)) {
         $this->info['name'] = NULL;
         $this->info['holders'] = NULL;
         $this->info['year'] = NULL;
         $this->info['no'] = NULL;
         $this->info['update'] = NULL;
         $this->formName = 'patentAddForm';
         $this->legend = 'Add Patent';
         $this->section = 'Add';
     } else {
         if (empty($info)) {
             Main::throwException('Internal Error Occured', 0, 'Failed To Load Data');
         } else {
             $this->info = $info;
             $this->formName = 'patentUpdateForm';
             $this->legend = 'Update Patent';
             $this->section = 'Update';
         }
     }
     $this->hdrcnt = "{$this->section} Patents";
 }
開發者ID:amigozgovi,項目名稱:agrotech,代碼行數:23,代碼來源:PatentsData.php

示例10: __construct

 function __construct($info = NULL)
 {
     if (!isset($info)) {
         $this->info['crop'] = NULL;
         $this->info['no'] = NULL;
         $this->info['age'] = NULL;
         $this->info['premium'] = NULL;
         $this->info['compensation'] = NULL;
         $this->formName = 'insuranceAddForm';
         $this->legend = 'Add Insurance';
         $this->section = 'Add';
         $this->hdrtxt = 'Insurance';
     } else {
         if (empty($info)) {
             Main::throwException('Internal Error Occured', 0, 'Failed To Load Data');
         } else {
             $this->info = $info;
             $this->formName = 'insuranceUpdateForm';
             $this->legend = 'Update Insurance';
             $this->section = 'Update';
         }
     }
     $this->hdrcnt = "{$this->section} Insurance";
 }
開發者ID:amigozgovi,項目名稱:agrotech,代碼行數:24,代碼來源:CropInsuranceData.php

示例11: __construct

 function __construct($info = NULL)
 {
     if (!isset($info)) {
         $this->info['name'] = NULL;
         $this->info['type'] = NULL;
         $this->info['code'] = NULL;
         $this->info['number'] = NULL;
         $this->info['district'] = NULL;
         $this->info['location'] = NULL;
         $this->formName = 'contactAddForm';
         $this->legend = 'Add Contact Details';
         $this->section = 'Add';
     } else {
         if (empty($info)) {
             Main::throwException('Internal Error Occured', 0, 'Failed To Load The Data');
         } else {
             $this->info = $info;
             $this->formName = 'contactUpdateForm';
             $this->legend = 'Update Contact Details';
             $this->section = 'Update';
         }
     }
     $this->hdrcnt = "{$this->section} Contact";
 }
開發者ID:amigozgovi,項目名稱:agrotech,代碼行數:24,代碼來源:ContactData.php


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