1 | <?php |
||
21 | class RavenClient extends SentryClientAdaptor |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * It's an ERROR unless proven otherwise! |
||
26 | * |
||
27 | * @var string |
||
28 | * @config |
||
29 | */ |
||
30 | private static $default_error_level = 'ERROR'; |
||
31 | |||
32 | /** |
||
33 | * @var Raven_Client |
||
34 | */ |
||
35 | protected $client; |
||
36 | |||
37 | /** |
||
38 | * A mapping of log-level values between Zend_Log => Raven_Client |
||
39 | * |
||
40 | * @var array |
||
41 | */ |
||
42 | protected $logLevels = [ |
||
43 | 'NOTICE' => \Raven_Client::INFO, |
||
44 | 'WARN' => \Raven_Client::WARNING, |
||
45 | 'ERR' => \Raven_Client::ERROR, |
||
46 | 'EMERG' => \Raven_Client::FATAL |
||
47 | ]; |
||
48 | |||
49 | /** |
||
50 | * @throws SentryLogWriterException |
||
51 | * @return void |
||
|
|||
52 | */ |
||
53 | public function __construct() |
||
67 | |||
68 | /** |
||
69 | * Used in unit tests. |
||
70 | * |
||
71 | * @return Raven_Client |
||
72 | */ |
||
73 | public function getSDK() |
||
77 | |||
78 | /** |
||
79 | * @inheritdoc |
||
80 | */ |
||
81 | public function setData($field, $data) |
||
101 | |||
102 | /** |
||
103 | * @inheritdoc |
||
104 | */ |
||
105 | public function getLevel($level) |
||
111 | |||
112 | /** |
||
113 | * @inheritdoc |
||
114 | */ |
||
115 | public function send($message, $extras = [], $data, $trace) |
||
122 | |||
123 | } |
||
124 |
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.