1 | <?php |
||
22 | class SentryMonologHandler extends SentryRavenHandler |
||
23 | { |
||
24 | /** |
||
25 | * @var SentryClientAdaptor |
||
26 | */ |
||
27 | protected $client; |
||
28 | |||
29 | /** |
||
30 | * @param int $level |
||
31 | * @param bool $bubble |
||
32 | * @param array $extras Extra parameters that will become "tags" in Sentry. |
||
33 | * @return void |
||
|
|||
34 | */ |
||
35 | public function __construct($level = Logger::DEBUG, $bubble = true, $extras = []) |
||
45 | |||
46 | /** |
||
47 | * @return SentryClientAdaptor |
||
48 | */ |
||
49 | public function getClient() |
||
53 | |||
54 | /** |
||
55 | * write() forms the entry point into the physical sending of the error. The |
||
56 | * sending itself is done by the current adaptor's `send()` method. |
||
57 | * |
||
58 | * @param array $record An array of error-context metadata with the following |
||
59 | * available keys: |
||
60 | * |
||
61 | * - message |
||
62 | * - context |
||
63 | * - level |
||
64 | * - level_name |
||
65 | * - channel |
||
66 | * - datetime |
||
67 | * - extra |
||
68 | * - formatted |
||
69 | * |
||
70 | * @return void |
||
71 | */ |
||
72 | protected function write(array $record) |
||
83 | |||
84 | /** |
||
85 | * Generate a cleaned-up backtrace of the event that got us here. |
||
86 | * |
||
87 | * @param array $record |
||
88 | * @return array |
||
89 | */ |
||
90 | private function backtrace($record) |
||
129 | |||
130 | /** |
||
131 | * Returns a default set of additional data specific to the user's part in |
||
132 | * the request. |
||
133 | * |
||
134 | * @param Member $member |
||
135 | * @return array |
||
136 | */ |
||
137 | private function getUserData(Member $member = null, $logger) |
||
149 | } |
||
150 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.