• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List

E:/E/GEAMP/www/openbiz/openbiz/others/Zend/Log/Writer/Abstract.php

00001 <?php
00024 require_once 'Zend/Log/Filter/Priority.php';
00025 
00034 abstract class Zend_Log_Writer_Abstract
00035 {
00039     protected $_filters = array();
00040 
00045     protected $_formatter;
00046 
00053     public function addFilter($filter)
00054     {
00055         if (is_integer($filter)) {
00056             $filter = new Zend_Log_Filter_Priority($filter);
00057         }
00058 
00059         $this->_filters[] = $filter;
00060     }
00061 
00068     public function write($event)
00069     {
00070         foreach ($this->_filters as $filter) {
00071             if (! $filter->accept($event)) {
00072                 return;
00073             }
00074         }
00075 
00076         // exception occurs on error
00077         $this->_write($event);
00078     }
00079 
00086     public function setFormatter($formatter)
00087     {
00088         $this->_formatter = $formatter;
00089     }
00090 
00096     public function shutdown()
00097     {}
00098 
00105     abstract protected function _write($event);
00106 
00107 }

Generated on Thu Apr 19 2012 17:01:17 for openbiz by  doxygen 1.7.2