| 1 | <?php |
||
| 7 | class EventLogger implements EventLoggerInterface |
||
| 8 | { |
||
| 9 | protected $filename; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * EventLogger constructor |
||
| 13 | */ |
||
| 14 | public function __construct($filename) |
||
| 18 | |||
| 19 | public function start() |
||
| 23 | |||
| 24 | public function stop() |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Write an event into the event log |
||
| 30 | * @param string $event_name |
||
| 31 | * @param array $args |
||
| 32 | * @param array $params |
||
| 33 | * @param array $response |
||
| 34 | */ |
||
| 35 | public function log($event_name, $args, $params, $response) |
||
| 41 | |||
| 42 | protected function writeHeader() |
||
| 48 | |||
| 49 | protected function getHeader() |
||
| 57 | |||
| 58 | protected function getEntry($event_name, $args, $params, $response) |
||
| 71 | } |
||
| 72 |
If you suppress an error, we recommend checking for the error condition explicitly: