1 | <?php |
||
8 | class BugNotifier |
||
9 | { |
||
10 | /** |
||
11 | * Fire a notification for the given exception using the configured driver. |
||
12 | * |
||
13 | * @param \Exception $e |
||
14 | * |
||
15 | * @return mixed |
||
16 | */ |
||
17 | public function exception(\Exception $e) |
||
28 | |||
29 | /** |
||
30 | * Send notification using the given driver. |
||
31 | * |
||
32 | * @param \FlyingLuscas\BugNotifier\Message $message |
||
33 | * @param \FlyingLuscas\BugNotifier\Drivers\DriverInterface $driver |
||
34 | * |
||
35 | * @return mixed |
||
36 | */ |
||
37 | private function sendNotification(Message $message, DriverInterface $driver) |
||
41 | |||
42 | /** |
||
43 | * Get the notification driver that should be used. |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | private function getNotificationDriver() |
||
58 | |||
59 | /** |
||
60 | * Check if the package should run on the current environment. |
||
61 | * |
||
62 | * @return bool |
||
63 | */ |
||
64 | private function shouldRunOnThisEnvironment() |
||
68 | |||
69 | /** |
||
70 | * Check if a given exception should be reported. |
||
71 | * |
||
72 | * @param \Exception $e |
||
73 | * |
||
74 | * @return bool |
||
75 | */ |
||
76 | private function shouldBeReported(\Exception $e) |
||
80 | } |
||
81 |