1<?php 2 3/** 4 * @see https://github.com/laminas/laminas-log for the canonical source repository 5 * @copyright https://github.com/laminas/laminas-log/blob/master/COPYRIGHT.md 6 * @license https://github.com/laminas/laminas-log/blob/master/LICENSE.md New BSD License 7 */ 8 9namespace Laminas\Log\Writer; 10 11class Mock extends AbstractWriter 12{ 13 /** 14 * array of log events 15 * 16 * @var array 17 */ 18 public $events = []; 19 20 /** 21 * shutdown called? 22 * 23 * @var bool 24 */ 25 public $shutdown = false; 26 27 /** 28 * Write a message to the log. 29 * 30 * @param array $event event data 31 * @return void 32 */ 33 public function doWrite(array $event) 34 { 35 $this->events[] = $event; 36 } 37 38 /** 39 * Record shutdown 40 * 41 * @return void 42 */ 43 public function shutdown() 44 { 45 $this->shutdown = true; 46 } 47} 48