00001 <?php 00024 require_once 'Zend/Log/Filter/Interface.php'; 00025 00034 class Zend_Log_Filter_Priority implements Zend_Log_Filter_Interface 00035 { 00039 protected $_priority; 00040 00044 protected $_operator; 00045 00054 public function __construct($priority, $operator = '<=') 00055 { 00056 if (! is_integer($priority)) { 00057 require_once 'Zend/Log/Exception.php'; 00058 throw new Zend_Log_Exception('Priority must be an integer'); 00059 } 00060 00061 $this->_priority = $priority; 00062 $this->_operator = $operator; 00063 } 00064 00071 public function accept($event) 00072 { 00073 return version_compare($event['priority'], $this->_priority, $this->_operator); 00074 } 00075 00076 }