| 1 | <?php |
||
| 5 | class ExceptionMonitor |
||
| 6 | { |
||
| 7 | |||
| 8 | /** |
||
| 9 | * It calls all enabled drivers and triggers requests to send notifications. |
||
| 10 | * |
||
| 11 | * @param \Exception $e |
||
| 12 | */ |
||
| 13 | public function notifyException(\Exception $e) |
||
| 27 | |||
| 28 | |||
| 29 | /** |
||
| 30 | * It sends notification to given driver. |
||
| 31 | * |
||
| 32 | * @param \Exception $e |
||
| 33 | * @param $driver |
||
| 34 | */ |
||
| 35 | protected function sendException(\Exception $e, $driver) |
||
| 40 | |||
| 41 | |||
| 42 | /** |
||
| 43 | * It injects driver's class to Laravel application. |
||
| 44 | * |
||
| 45 | * @param $driver |
||
| 46 | * |
||
| 47 | * @return mixed |
||
| 48 | */ |
||
| 49 | protected function getDriverInstance($driver) |
||
| 55 | |||
| 56 | |||
| 57 | /** |
||
| 58 | * Check if given environment is enabled in configuration file. |
||
| 59 | * |
||
| 60 | * @param $environment |
||
| 61 | * |
||
| 62 | * @return mixed |
||
| 63 | */ |
||
| 64 | public function enabledEnvironment($environment) |
||
| 74 | |||
| 75 | } |
||
| 76 |