1: <?php
2: /**
3: * Horde Log package
4: *
5: * This package is based on Zend_Log from the Zend Framework
6: * (http://framework.zend.com). Both that package and this
7: * one were written by Mike Naberezny and Chuck Hagenbuch.
8: *
9: * @author Mike Naberezny <mike@maintainable.com>
10: * @author Chuck Hagenbuch <chuck@horde.org>
11: * @category Horde
12: * @license http://www.horde.org/licenses/bsd BSD
13: * @package Log
14: * @subpackage Handlers
15: */
16:
17: /**
18: * @author Mike Naberezny <mike@maintainable.com>
19: * @author Chuck Hagenbuch <chuck@horde.org>
20: * @category Horde
21: * @license http://www.horde.org/licenses/bsd BSD
22: * @package Log
23: * @subpackage Handlers
24: */
25: class Horde_Log_Handler_Mock extends Horde_Log_Handler_Base
26: {
27: /**
28: * Log events.
29: *
30: * @var array
31: */
32: public $events = array();
33:
34: /**
35: * Was shutdown called?
36: *
37: * @var boolean
38: */
39: public $shutdown = false;
40:
41: /**
42: * Write a message to the log.
43: *
44: * @param array $event Event data.
45: */
46: public function write($event)
47: {
48: $this->events[] = $event;
49: }
50:
51: /**
52: * Record shutdown
53: */
54: public function shutdown()
55: {
56: $this->shutdown = true;
57: }
58:
59: }
60: