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


PHP AError::toDebug方法代码示例

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


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

示例1: get_error

 /**
  * Get language definition for error. Function returns text anyway!
  *
  * @param string $key
  * @return string
  */
 public function get_error($key)
 {
     $result = $this->get($key);
     if ($key == $result || trim($result) == '') {
         $backtrace = debug_backtrace();
         $ts = time();
         $log_message = $ts . "- Not described error.\n" . "File: " . $backtrace[0]['file'] . "\n" . "Line: " . $backtrace[0]['line'] . "\n" . "Args: " . var_export($backtrace[0]['args'], true) . "\n";
         $e = new AError($log_message);
         $e->toDebug()->toLog()->toMessages();
         $result = "Not described error happened.";
         if (IS_ADMIN === true) {
             $result .= "Check log for details. Code [" . $ts . "]";
         }
     }
     return $result;
 }
开发者ID:KulturedKitsch,项目名称:kulturedkitsch.info-store,代码行数:22,代码来源:language.php

示例2: processError

 /**
  * @param string $title
  * @param string $error
  * @param string $level
  * @return string
  */
 private function processError($title, $error, $level = 'warning')
 {
     $this->message->{'save' . ucfirst($level)}($title, $error);
     $wrn = new AError($error);
     $wrn->toDebug()->toLog();
     return $error;
 }
开发者ID:harshzalavadiya,项目名称:fatak,代码行数:13,代码来源:data.php

示例3: getField

 /**
  * Get given field, type, values and selected/default
  *
  * @param string $fname
  * @return array with field data
  */
 public function getField($fname)
 {
     foreach ($this->fields as $field) {
         if ($field['field_name'] == $fname) {
             return array('field_name' => $field['field_name'], 'element_type' => $field['element_type'], 'required' => $field['required'], 'name' => $field['name'], 'value' => $field['value'], 'settings' => $field['settings'], 'description' => $field['description']);
         }
     }
     $err = new AError('NOT EXIST Form field with name ' . $fname);
     $err->toDebug()->toLog();
     return null;
 }
开发者ID:harshzalavadiya,项目名称:fatak,代码行数:17,代码来源:form.php

示例4: fetch

 /**
  * Process the template
  * @param $filename
  * @return string
  */
 public function fetch($filename)
 {
     ADebug::checkpoint('fetch ' . $filename . ' start');
     //#PR First see if we have full path to template file. Nothing to do. Higher precedence!
     if (is_file($filename)) {
         //#PR set full path
         $file = $filename;
     } else {
         //#PR Build the path to the template file
         $path = DIR_TEMPLATE;
         if (!defined('INSTALL')) {
             $file = $this->_get_template_path($path, '/template/' . $filename, 'full');
         } else {
             $file = $path . $filename;
         }
         if ($this->has_extensions && ($result = $this->extensions->isExtensionResource('T', $filename))) {
             if (is_file($file)) {
                 $warning = new AWarning("Extension <b>" . $result['extension'] . "</b> overrides core template with <b>" . $filename . "</b>");
                 $warning->toDebug();
             }
             $file = $result['file'];
         }
     }
     if (is_file($file)) {
         $content = '';
         $file_pre = str_replace('.tpl', POSTFIX_PRE . '.tpl', $filename);
         if ($result = $this->extensions->isExtensionResource('T', $file_pre)) {
             $content .= $this->_fetch($result['file']);
         }
         $content .= $this->_fetch($file);
         $file_post = str_replace('.tpl', POSTFIX_POST . '.tpl', $filename);
         if ($result = $this->extensions->isExtensionResource('T', $file_post)) {
             $content .= $this->_fetch($result['file']);
         }
         ADebug::checkpoint('fetch ' . $filename . ' end');
         return $content;
     } else {
         $error = new AError('Error: Could not load template ' . $filename . '!', AC_ERR_LOAD);
         $error->toDebug()->toLog();
     }
     return '';
 }
开发者ID:vglide,项目名称:abantecart-src,代码行数:47,代码来源:view.php

示例5: fetch

 /**
  * Process the template
  * @param $filename
  * @return string
  */
 public function fetch($filename)
 {
     ADebug::checkpoint('fetch ' . $filename . ' start');
     //#PR First see if we have full path to template file. Nothing to do. Higher precedence!
     if (is_file($filename)) {
         //#PR set full path
         $file = $filename;
     } else {
         //#PR Build the path to the template file
         $path = DIR_TEMPLATE;
         if (!defined('INSTALL')) {
             $file = $this->_get_template_path($path, '/template/' . $filename, 'full');
         } else {
             $file = $path . $filename;
         }
         if ($this->has_extensions && ($result = $this->extensions->isExtensionResource('T', $filename))) {
             if (is_file($file)) {
                 $warning = new AWarning("Extension <b>" . $result['extension'] . "</b> overrides core template with <b>" . $filename . "</b>");
                 $warning->toDebug();
             }
             $file = $result['file'];
         }
     }
     if (empty($file)) {
         $error = new AError('Error: Unable to identify file path to template ' . $filename . '! Check blocks in the layout or enable debug mode to get more details. ' . AC_ERR_LOAD);
         $error->toDebug()->toLog();
         return '';
     }
     if (is_file($file)) {
         $content = '';
         $file_pre = str_replace('.tpl', POSTFIX_PRE . '.tpl', $filename);
         if ($result = $this->extensions->getAllPrePostTemplates($file_pre)) {
             foreach ($result as $item) {
                 $content .= $this->_fetch($item['file']);
             }
         }
         $content .= $this->_fetch($file);
         $file_post = str_replace('.tpl', POSTFIX_POST . '.tpl', $filename);
         if ($result = $this->extensions->getAllPrePostTemplates($file_post)) {
             foreach ($result as $item) {
                 $content .= $this->_fetch($item['file']);
             }
         }
         ADebug::checkpoint('fetch ' . $filename . ' end');
         //Write HTML Cache if we need and can write
         if ($this->config && $this->config->get('config_html_cache') && $this->html_cache_key) {
             if ($this->cache->save_html_cache($this->html_cache_key, $content) === false) {
                 $error = new AError('Error: Cannot create HTML cache for file ' . $this->html_cache_key . '! Directory to write cache is not writable', AC_ERR_LOAD);
                 $error->toDebug()->toLog();
             }
         }
         return $content;
     } else {
         $error = new AError('Error: Cannot load template ' . $filename . '! File ' . $file . ' is missing or incorrect. Check blocks in the layout or enable debug mode to get more details. ', AC_ERR_LOAD);
         $error->toDebug()->toLog();
     }
     return '';
 }
开发者ID:siddht1,项目名称:abantecart-src,代码行数:63,代码来源:view.php


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