<?php
/**
* Horde Log package
*
* This package is based on Zend_Log from the Zend Framework
* (http://framework.zend.com). Both that package and this
* one were written by Mike Naberezny and Chuck Hagenbuch.
*
* @category Horde
* @package Horde_Log
* @subpackage Filters
* @author Mike Naberezny <hide@address.com>
* @author Chuck Hagenbuch <hide@address.com>
* @license http://opensource.org/licenses/bsd-license.php BSD
*/
/**
* @category Horde
* @package Horde_Log
* @subpackage Filters
* @author Mike Naberezny <hide@address.com>
* @author Chuck Hagenbuch <hide@address.com>
* @license http://opensource.org/licenses/bsd-license.php BSD
*/
class Horde_Log_Filter_Suppress implements Horde_Log_Filter_Interface
{
/**
* @var boolean
*/
protected $_accept = true;
/**
* This is a simple boolean filter.
*
* Call suppress(true) to suppress all log events.
* Call suppress(false) to accept all log events.
*
* @param boolean $suppress Should all log events be suppressed?
* @return void
*/
public function suppress($suppress)
{
$this->_accept = (! $suppress);
}
/**
* Returns TRUE to accept the message, FALSE to block it.
*
* @param array $event event data
* @return boolean accepted?
*/
public function accept($event)
{
return $this->_accept;
}
}