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


PHP PMA_Error::isDisplayed方法代码示例

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


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

示例1: __destruct

 /**
  * Destructor
  *
  * stores errors in session
  *
  */
 public function __destruct()
 {
     if (isset($_SESSION)) {
         if (!isset($_SESSION['errors'])) {
             $_SESSION['errors'] = array();
         }
         if ($GLOBALS['cfg']['Error_Handler']['gather']) {
             // remember all errors
             $_SESSION['errors'] = array_merge($_SESSION['errors'], $this->errors);
         } else {
             // remember only not displayed errors
             foreach ($this->errors as $key => $error) {
                 /**
                  * We don't want to store all errors here as it would
                  * explode user session. In case  you want them all set
                  * $GLOBALS['cfg']['Error_Handler']['gather'] to true
                  */
                 if (count($_SESSION['errors']) >= 20) {
                     $error = new PMA_Error(0, __('Too many error messages, some are not displayed.'), __FILE__, __LINE__);
                     $_SESSION['errors'][$error->getHash()] = $error;
                     break;
                 } else {
                     if ($error instanceof PMA_Error && !$error->isDisplayed()) {
                         $_SESSION['errors'][$key] = $error;
                     }
                 }
             }
         }
     }
 }
开发者ID:nhodges,项目名称:phpmyadmin,代码行数:36,代码来源:Error_Handler.class.php

示例2: __destruct

 /**
  * Destructor
  *
  * stores errors in session
  *
  */
 public function __destruct()
 {
     if (isset($_SESSION)) {
         if (!isset($_SESSION['errors'])) {
             $_SESSION['errors'] = array();
         }
         // remember only not displayed errors
         foreach ($this->errors as $key => $error) {
             /**
              * We don't want to store all errors here as it would
              * explode user session.
              */
             if (count($_SESSION['errors']) >= 10) {
                 $error = new PMA_Error(0, __('Too many error messages, some are not displayed.'), __FILE__, __LINE__);
                 $_SESSION['errors'][$error->getHash()] = $error;
                 break;
             } else {
                 if ($error instanceof PMA_Error && !$error->isDisplayed()) {
                     $_SESSION['errors'][$key] = $error;
                 }
             }
         }
     }
 }
开发者ID:ecssjapan,项目名称:guiding-you-afteropen,代码行数:30,代码来源:Error_Handler.class.php


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