1 | <?php |
||
13 | class ExceptionHandler implements ExceptionHandlerInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var LoggerInterface |
||
17 | */ |
||
18 | protected $logger; |
||
19 | |||
20 | /** |
||
21 | * ExceptionHandler constructor. |
||
22 | * |
||
23 | * @param LoggerInterface $logger |
||
24 | */ |
||
25 | public function __construct(LoggerInterface $logger) |
||
29 | |||
30 | /** |
||
31 | * Report or log an exception. |
||
32 | * |
||
33 | * @param \Exception $e |
||
34 | */ |
||
35 | public function report(Exception $e) |
||
39 | |||
40 | /** |
||
41 | * Render an exception into an HTTP response. |
||
42 | * |
||
43 | * @param \HttpRequest $request |
||
44 | * @param \Exception $e |
||
45 | * |
||
46 | * @return \Symfony\Component\HttpFoundation\Response|void |
||
47 | */ |
||
48 | public function render($request, Exception $e) |
||
52 | |||
53 | /** |
||
54 | * Render an exception to the console. |
||
55 | * |
||
56 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
57 | * @param \Exception $e |
||
58 | */ |
||
59 | public function renderForConsole($output, Exception $e) |
||
63 | } |
||
64 |