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


PHP DBG::stack方法代码示例

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


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

示例1: set

 public static function set($prop, &$val)
 {
     switch ($prop) {
         case 'cx':
             // set is only used for installerCx. Normal cx class will load with \Env::get('cx')
             self::$props[$prop] = $val;
             \DBG::msg(__METHOD__ . ": Setting '{$prop}' is deprecated. Use only for installer, otherwise use \\Env::('{$prop}')");
             \DBG::stack();
             break;
         case 'em':
             self::$props[$prop] = $val;
             \DBG::msg(__METHOD__ . ": Setting '{$prop}' is deprecated. Env::get({$prop}) always returns the active/preferred instance of {$prop}.");
             \DBG::stack();
             break;
         default:
             self::$props[$prop] = $val;
             break;
     }
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:19,代码来源:Env.class.php

示例2: checkTimeoutLimit

function checkTimeoutLimit()
{
    global $_CORELANG;
    $timeoutTime = UPDATE_TIMEOUT_TIME;
    if (!empty($_SESSION['contrexx_update']['max_execution_time'])) {
        $timeoutTime = UPDATE_TIME + $_SESSION['contrexx_update']['max_execution_time'];
    }
    if ($timeoutTime > time()) {
        return true;
    }
    \DBG::msg('Timeout of ' . $timeoutTime . 's reached!');
    \DBG::stack();
    setUpdateMsg($_CORELANG['TXT_UPDATE_PROCESS_HALTED'], 'title');
    setUpdateMsg($_CORELANG['TXT_UPDATE_PROCESS_HALTED_TIME_MSG'] . '<br /><br />', 'msg');
    setUpdateMsg('<input type="submit" value="' . $_CORELANG['TXT_CONTINUE_UPDATE'] . '" name="updateNext" /><input type="hidden" name="processUpdate" id="processUpdate" />', 'button');
    return false;
}
开发者ID:Cloudrexx,项目名称:cloudrexx,代码行数:17,代码来源:ContrexxUpdate.class.php

示例3: add_placeholder

 /**
  * Adds a placeholder for the CSRF code to the given template.
  * This is so you can easily patch javascript code that handles
  * URLs, as this cannot be done by add_code().
  * @param   \Cx\Core\Html\Sigma     $tpl    Template object
  */
 public static function add_placeholder($tpl)
 {
     if (!self::__is_logged_in()) {
         return true;
     }
     // do not add placeholder in case current request is an AJAX request.  They're secure
     // by definition and also, they're much more delicate in
     // what can be returned - and they usually exceed the
     // request amount limit pretty quickly (see active_decrease etc)
     if (self::__is_ajax()) {
         return;
     }
     if (!is_object($tpl)) {
         \DBG::msg("self::add_placeholder(): fix this call, that ain't a template object! (Stack follows)");
         \DBG::stack();
     }
     $code = self::__get_code();
     $tpl->setGlobalVariable(array("CSRF_PARAM" => self::param(), "CSRF_KEY" => "{$code}"));
     return true;
 }
开发者ID:hbdsklf,项目名称:LimeCMS,代码行数:26,代码来源:Csrf.class.php

示例4: errorMessage

 /**
  * Returns a textual error message for an error code
  *
  * @access public
  * @param  integer  error code
  * @param  string   additional data to insert into message
  * @return string   error message
  */
 function errorMessage($code, $data = null)
 {
     static $errorMessages;
     \DBG::stack();
     if (!isset($errorMessages)) {
         $errorMessages = array(SIGMA_ERROR => 'unknown error', SIGMA_OK => '', SIGMA_TPL_NOT_FOUND => 'Cannot read the template file \'%s\'', SIGMA_BLOCK_NOT_FOUND => 'Cannot find block \'%s\'', SIGMA_BLOCK_DUPLICATE => 'The name of a block must be unique within a template. Block \'%s\' found twice.', SIGMA_CACHE_ERROR => 'Cannot save template file \'%s\'', SIGMA_UNKNOWN_OPTION => 'Unknown option \'%s\'', SIGMA_PLACEHOLDER_NOT_FOUND => 'Variable placeholder \'%s\' not found', SIGMA_PLACEHOLDER_DUPLICATE => 'Placeholder \'%s\' should be unique, found in multiple blocks', SIGMA_BLOCK_EXISTS => 'Block \'%s\' already exists', SIGMA_INVALID_CALLBACK => 'Callback does not exist');
     }
     if (PEAR::isError($code)) {
         $code = $code->getCode();
     }
     if (!isset($errorMessages[$code])) {
         return $errorMessages[SIGMA_ERROR];
     } else {
         return null === $data ? $errorMessages[$code] : sprintf($errorMessages[$code], $data);
     }
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:24,代码来源:Sigma.php


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