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


PHP LoggerLevel::equals方法代码示例

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


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

示例1: decide

 /**
  * Return the decision of this filter.
  * 
  * Returns {@link LoggerFilter::NEUTRAL} if the <b><var>LevelToMatch</var></b>
  * option is not set or if there is not match.	Otherwise, if there is a
  * match, then the returned decision is {@link LoggerFilter::ACCEPT} if the
  * <b><var>AcceptOnMatch</var></b> property is set to <i>true</i>. The
  * returned decision is {@link LoggerFilter::DENY} if the
  * <b><var>AcceptOnMatch</var></b> property is set to <i>false</i>.
  *
  * @param LoggerLoggingEvent $event
  * @return integer
  */
 public function decide(LoggerLoggingEvent $event)
 {
     if ($this->levelToMatch === null) {
         return LoggerFilter::NEUTRAL;
     }
     if ($this->levelToMatch->equals($event->getLevel())) {
         return $this->acceptOnMatch ? LoggerFilter::ACCEPT : LoggerFilter::DENY;
     } else {
         return LoggerFilter::NEUTRAL;
     }
 }
开发者ID:dobreapa,项目名称:owasp-esapi-php,代码行数:24,代码来源:LoggerFilterLevelMatch.php

示例2: decide

 /**
  * Return the decision of this filter.
  * 
  * Returns {@link LOG4PHP_LOGGER_FILTER_NEUTRAL} if the <b><var>LevelToMatch</var></b>
  * option is not set or if there is not match.  Otherwise, if there is a
  * match, then the returned decision is {@link LOG4PHP_LOGGER_FILTER_ACCEPT} if the
  * <b><var>AcceptOnMatch</var></b> property is set to <i>true</i>. The
  * returned decision is {@link LOG4PHP_LOGGER_FILTER_DENY} if the
  * <b><var>AcceptOnMatch</var></b> property is set to <i>false</i>.
  *
  * @param LoggerLoggingEvent $event
  * @return integer
  */
 function decide($event)
 {
     if ($this->levelToMatch === null) {
         return LOG4PHP_LOGGER_FILTER_NEUTRAL;
     }
     if ($this->levelToMatch->equals($event->getLevel())) {
         return $this->getAcceptOnMatch() ? LOG4PHP_LOGGER_FILTER_ACCEPT : LOG4PHP_LOGGER_FILTER_DENY;
     } else {
         return LOG4PHP_LOGGER_FILTER_NEUTRAL;
     }
 }
开发者ID:rrsc,项目名称:freemed,代码行数:24,代码来源:LoggerLevelMatchFilter.php


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