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


PHP Debug::warningHandler方法代码示例

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


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

示例1: fetchArticles

 public function fetchArticles()
 {
     try {
         $list = HailApi::getArticlesByTag($this->HailID);
     } catch (HailApiException $ex) {
         Debug::warningHandler(E_WARNING, $ex->getMessage(), $ex->getFile(), $ex->getLine(), $ex->getTrace());
         return;
     }
     $hailIdList = array();
     foreach ($list as $hailData) {
         // Build up Hail ID list
         $hailIdList[] = $hailData->id;
         // Check if we can find an existing item.
         $hailObj = HailArticle::get()->filter(array('HailID' => $hailData->id))->First();
         if (!$hailObj) {
             $hailObj = new HailArticle();
         }
         $hailObj->importHailData($hailData);
         $this->Articles()->add($hailObj);
     }
     $this->Articles()->exclude('HailID', $hailIdList)->removeAll();
 }
开发者ID:firebrandhq,项目名称:silverstripe-hail,代码行数:22,代码来源:HailTag.php

示例2: errorHandler

function errorHandler($errno, $errstr, $errfile, $errline, $errcontext)
{
    switch ($errno) {
        case E_ERROR:
        case E_CORE_ERROR:
        case E_USER_ERROR:
            Debug::fatalHandler($errno, $errstr, $errfile, $errline, $errcontext);
            break;
        case E_WARNING:
        case E_CORE_WARNING:
        case E_USER_WARNING:
            Debug::warningHandler($errno, $errstr, $errfile, $errline, $errcontext);
            break;
    }
}
开发者ID:ramziammar,项目名称:websites,代码行数:15,代码来源:Debug.php

示例3: fetchVideos

 /**
  * Fetch the video gallery of this article from the Hail API
  *
  * @return void
  */
 public function fetchVideos()
 {
     try {
         $list = HailApi::getVideosByArticles($this->HailID);
     } catch (HailApiException $ex) {
         Debug::warningHandler(E_WARNING, $ex->getMessage(), $ex->getFile(), $ex->getLine(), $ex->getTrace());
         return;
     }
     $hailIdList = array();
     foreach ($list as $hailData) {
         // Build up Hail ID list
         $hailIdList[] = $hailData->id;
         // Check if we can find an existing item.
         $hailObj = HailVideo::get()->filter(array('HailID' => $hailData->id))->First();
         if (!$hailObj) {
             $hailObj = new HailVideo();
         }
         $hailObj->importHailData($hailData);
         $this->VideoGallery()->add($hailObj);
     }
     // Remove images that are no longer assign to this article
     if ($hailIdList) {
         $this->VideoGallery()->exclude('HailID', $hailIdList)->removeAll();
     } else {
         $this->VideoGallery()->removeAll();
     }
 }
开发者ID:firebrandhq,项目名称:silverstripe-hail,代码行数:32,代码来源:HailArticle.php

示例4: refresh

 /**
  * Retrieves the latest version of this object whatever it's outdated or not.
  *
  * @return HailApiObject
  */
 public function refresh()
 {
     if ($this->ID && $this->HailID) {
         try {
             $data = HailApi::getOne(static::getObjectType(), $this->HailID);
         } catch (HailApiException $ex) {
             Debug::warningHandler(E_WARNING, $ex->getMessage(), $ex->getFile(), $ex->getLine(), $ex->getTrace());
             return $this;
         }
         $this->importHailData($data);
         $this->refreshing();
     }
     return $this;
 }
开发者ID:firebrandhq,项目名称:silverstripe-hail,代码行数:19,代码来源:HailApiObject.php

示例5: errorHandler

/**
 * Generic callback to catch standard PHP runtime errors thrown by the interpreter
 * or manually triggered with the user_error function.
 * Caution: The error levels default to E_ALL is the site is in dev-mode (set in main.php).
 * 
 * @ignore 
 * @param int $errno
 * @param string $errstr
 * @param string $errfile
 * @param int $errline
 */
function errorHandler($errno, $errstr, $errfile, $errline)
{
    switch ($errno) {
        case E_ERROR:
        case E_CORE_ERROR:
        case E_USER_ERROR:
            return Debug::fatalHandler($errno, $errstr, $errfile, $errline, debug_backtrace());
        case E_WARNING:
        case E_CORE_WARNING:
        case E_USER_WARNING:
            return Debug::warningHandler($errno, $errstr, $errfile, $errline, debug_backtrace());
        case E_NOTICE:
        case E_USER_NOTICE:
        case E_DEPRECATED:
        case E_USER_DEPRECATED:
        case E_STRICT:
            return Debug::noticeHandler($errno, $errstr, $errfile, $errline, debug_backtrace());
    }
}
开发者ID:jareddreyer,项目名称:catalogue,代码行数:30,代码来源:Debug.php

示例6: errorHandler

/**
 * Generic callback to catch standard PHP runtime errors thrown by the interpreter
 * or manually triggered with the user_error function.
 * Caution: The error levels default to E_ALL is the site is in dev-mode (set in main.php).
 * 
 * @ignore 
 * @param int $errno
 * @param string $errstr
 * @param string $errfile
 * @param int $errline
 */
function errorHandler($errno, $errstr, $errfile, $errline)
{
    switch ($errno) {
        case E_ERROR:
        case E_CORE_ERROR:
        case E_USER_ERROR:
            Debug::fatalHandler($errno, $errstr, $errfile, $errline, null);
            break;
        case E_WARNING:
        case E_CORE_WARNING:
        case E_USER_WARNING:
            Debug::warningHandler($errno, $errstr, $errfile, $errline, null);
            break;
        case E_NOTICE:
        case E_USER_NOTICE:
        case E_DEPRECATED:
        case E_USER_DEPRECATED:
        case E_STRICT:
            Debug::noticeHandler($errno, $errstr, $errfile, $errline, null);
            break;
    }
}
开发者ID:nomidi,项目名称:sapphire,代码行数:33,代码来源:Debug.php

示例7: error_handler

 /**
  * Generic callback to catch standard PHP runtime errors thrown by the interpreter
  * or manually triggered with the user_error function.
  * Caution: The error levels default to E_ALL is the site is in dev-mode (set in main.php).
  *
  * @ignore
  * @param int $errno
  * @param string $errstr
  * @param string $errfile
  * @param int $errline
  */
 public static function error_handler($errno, $errstr, $errfile, $errline)
 {
     switch ($errno) {
         case E_ERROR:
         case E_CORE_ERROR:
         case E_USER_ERROR:
             StaticPagesQueue::has_error(self::$current_url, $errstr);
             Debug::fatalHandler($errno, $errstr, $errfile, $errline, null);
             break;
         case E_WARNING:
         case E_CORE_WARNING:
         case E_USER_WARNING:
             StaticPagesQueue::has_error(self::$current_url, $errstr);
             Debug::warningHandler($errno, $errstr, $errfile, $errline, null);
             break;
         case E_NOTICE:
         case E_USER_NOTICE:
             Debug::noticeHandler($errno, $errstr, $errfile, $errline, null);
             break;
     }
 }
开发者ID:spark-green,项目名称:silverstripe-staticpublishqueue,代码行数:32,代码来源:BuildStaticCacheFromQueue.php


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