当前位置: 首页>>代码示例>>PHP>>正文


PHP CUtils::raiseError方法代码示例

本文整理汇总了PHP中CUtils::raiseError方法的典型用法代码示例。如果您正苦于以下问题:PHP CUtils::raiseError方法的具体用法?PHP CUtils::raiseError怎么用?PHP CUtils::raiseError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CUtils的用法示例。


在下文中一共展示了CUtils::raiseError方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: readConfig

 /**
  * Set fields propeties
  */
 function readConfig()
 {
     if (!empty($this->props['fieldset']) && is_array($this->props['fieldset'])) {
         $this->fields = $this->props['fieldset'];
     } else {
         CUtils::raiseError('Table config file format error: ' . $this->name, ERROR_DIE);
     }
 }
开发者ID:rawork,项目名称:colors-life,代码行数:11,代码来源:DBTable.php

示例2: __construct

 public function __construct($host, $user, $pass, $base)
 {
     $this->connection = null;
     $this->result = array();
     $this->base = $base;
     $this->host = $host;
     $this->user = $user;
     $this->pass = $pass;
     try {
         $this->connection = $this->openConnection();
     } catch (Exception $e) {
         CUtils::raiseError($e->getMessage(), ERROR_DIE);
     }
 }
开发者ID:rawork,项目名称:colors-life,代码行数:14,代码来源:DBConnector.php

示例3: getBaseTableKey

 function getBaseTableKey()
 {
     if (!CUtils::_getVar('table')) {
         if (sizeof($this->unit->tables) > 0) {
             foreach ($this->unit->tables as $k => $v) {
                 $_GET['table'] = $k;
                 break;
             }
         } else {
             CUtils::raiseError('Tables not exists', ERROR_DIE);
         }
     }
     return CUtils::_getVar('table');
 }
开发者ID:rawork,项目名称:colors-life,代码行数:14,代码来源:UnitAdminInterface.php

示例4: getTemplate

 protected function getTemplate()
 {
     $where = "(tr.type='0' AND tr.cond='')";
     $where .= " OR (tr.type='T' AND ((tr.date_beg > 0 AND tr.date_beg <= NOW()) OR tr.date_beg = 0) AND (tr.date_end >= NOW() OR tr.date_end = 0))";
     //$where .= " OR (tr.type='U' AND LOCATE(tr.cond,'".$GLOBALS['db']->escapeStr($_SERVER['REQUEST_URI'])."')>0)";
     if (!empty($GLOBALS['urlprops']['node']['name'])) {
         $where .= " OR (tr.type='F' AND tr.cond='" . $GLOBALS['urlprops']['node']['name'] . "')";
     }
     $q = "SELECT tt.template FROM templates_templates tt JOIN templates_rules tr ON tt.id=tr.template_id WHERE tr.lang='" . $GLOBALS['urlprops']['lang'] . "' AND(" . $where . ") ORDER BY ord DESC";
     //		var_dump($q);
     if ($_template = $GLOBALS['rtti']->getNativeItem($q)) {
         if (!empty($_template['template']) && file_exists($GLOBALS['PRJ_DIR'] . $_template['template'])) {
             return $GLOBALS['PRJ_DIR'] . $_template['template'];
         } else {
             CUtils::raiseError('Template file error', ERROR_DIE);
         }
     } else {
         CUtils::raiseError('Template settings error', ERROR_DIE);
     }
 }
开发者ID:rawork,项目名称:colors-life,代码行数:20,代码来源:CPage.php

示例5: inc_lib

$GLOBALS['smarty']->compile_check = true;
$GLOBALS['smarty']->debugging = false;
$GLOBALS['smarty']->assign('prj_name', $PRJ_NAME);
$GLOBALS['smarty']->assign('prj_zone', $PRJ_ZONE);
$GLOBALS['smarty']->assign('prj_dir', $PRJ_DIR);
$GLOBALS['smarty']->assign('prj_ref', $PRJ_REF);
$GLOBALS['smarty']->assign('lib_dir', $LIB_DIR);
$GLOBALS['smarty']->assign('lib_ref', $LIB_REF);
$GLOBALS['smarty']->assign('theme_dir', $THEME_DIR);
$GLOBALS['smarty']->assign('theme_ref', $THEME_REF);
inc_lib('AdminInterface/AdminProtect.php');
inc_lib('db/DBTable.php');
inc_lib('db/DBRTTI.php');
if ($_SERVER['SCRIPT_NAME'] != '/restore.php') {
    if (file_exists($PRJ_DIR . '/restore.php')) {
        CUtils::raiseError('Удалите файл restore.php в корне сайта', ERROR_DIE);
    }
    // Включаем парсер URL
    inc_lib('CParser.php');
    $parser = new CParser();
    $GLOBALS['urlprops'] = $parser->getURLProps();
    // Инициализация текущего языка
    if (!isset($_SESSION['lang'])) {
        $_SESSION['lang'] = CUtils::_postVar('lang', false, 'ru');
    }
    if (CUtils::_postVar('lang') && $_SESSION['lang'] != CUtils::_postVar('lang')) {
        $_SESSION['lang'] = CUtils::_postVar('lang');
        header('location: ' . $GLOBALS['urlprops']['uri'] . ($_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : ''));
    }
    $GLOBALS['smarty']->assign('slang', $GLOBALS['urlprops']['lang']);
    $GLOBALS['smarty']->assign('urlprops', $GLOBALS['urlprops']);
开发者ID:rawork,项目名称:colors-life,代码行数:31,代码来源:init.php

示例6: cron

 public function cron($period)
 {
     if (!empty($period)) {
         set_time_limit(0);
         echo 'Cron (' . $period . '):';
         foreach ($this->units as $u) {
             echo ' ' . $u->unit->ocomponent['name'];
             $name = 'every' . $period;
             $u->unit->{$name}();
         }
     } else {
         CUtils::raiseError('Cron params error', ERROR_DIE);
     }
 }
开发者ID:rawork,项目名称:colors-life,代码行数:14,代码来源:AdminInterface.php

示例7: raiseError

 /**
  * Trigger a PEAR error
  */
 public function raiseError($msg, $code)
 {
     return CUtils::raiseError($msg, $this->_pearErrorMode);
 }
开发者ID:rawork,项目名称:colors-life,代码行数:7,代码来源:CCache.php

示例8: getClass

 function getClass($class)
 {
     $anames = explode('_', $class);
     $tname = str_replace('_', '', stristr($class, '_'));
     $component = $this->getComponent($anames[0]);
     $a = $this->getItem('table_tables', "name='" . $tname . "' AND module_id=" . $component['id']);
     if (sizeof($a) > 0) {
         return $a;
     } else {
         CUtils::raiseError('Class not exists: ' . $class, ERROR_DIE);
     }
 }
开发者ID:rawork,项目名称:colors-life,代码行数:12,代码来源:DBRTTI.php


注:本文中的CUtils::raiseError方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。