1 | <?php |
||
10 | class ErrorHandler implements ErrorHandling |
||
11 | { |
||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | protected $handlers = []; |
||
16 | |||
17 | /** |
||
18 | * @codeCoverageIgnore |
||
19 | */ |
||
20 | public function __construct() |
||
31 | |||
32 | /** |
||
33 | * @param $exception |
||
34 | * @param Closure $handler |
||
35 | * @return $this |
||
36 | */ |
||
37 | 11 | public function register($exception, Closure $handler) |
|
43 | |||
44 | /** |
||
45 | * @param Exception $exception |
||
46 | * |
||
47 | * @return void |
||
48 | */ |
||
49 | public function handle(Exception $exception) |
||
70 | |||
71 | /** |
||
72 | * @return Closure |
||
73 | */ |
||
74 | protected function setExceptionHandler() |
||
80 | |||
81 | /** |
||
82 | * @return Closure |
||
83 | * @throws ErrorException |
||
84 | */ |
||
85 | protected function setErrorHandler() |
||
95 | |||
96 | /** |
||
97 | * @return Closure |
||
98 | * @codeCoverageIgnore |
||
99 | */ |
||
100 | protected function handleFatalError() |
||
110 | } |
||
111 |