当前位置: 首页>>代码示例>>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;未经允许,请勿转载。