Mock.php

Go to the documentation of this file.
00001 <?php
00002 
00031 class Robo47_Log_Filter_Mock extends Zend_Log_Filter_Abstract
00032 {
00033 
00037     public $accept = true;
00041     public $lastEvent = null;
00046     public $events = array();
00050     public $constructorParams = array();
00051 
00056     public function __construct($accept = true)
00057     {
00058         $this->accept = $accept;
00059         $this->constructorParams = func_get_args();
00060     }
00061 
00067     public function getOptions()
00068     {
00069         return array();
00070     }
00071 
00077     public function accept($event)
00078     {
00079         $this->lastEvent = $event;
00080         $this->events[] = $event;
00081         return $this->accept;
00082     }
00083 
00090     static public function factory($config)
00091     {
00092         return new Robo47_Log_Filter_Mock($config);
00093     }
00094 }