Total Complexity | 6 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
15 | class Listener |
||
16 | { |
||
17 | /** |
||
18 | * @var \Zicht\Bundle\UrlBundle\Entity\ErrorLog |
||
19 | */ |
||
20 | protected $log = null; |
||
21 | |||
22 | /** |
||
23 | * Construct with the passed logger service |
||
24 | * |
||
25 | * @param Logging $logging |
||
26 | */ |
||
27 | public function __construct(Logging $logging) |
||
28 | { |
||
29 | $this->logging = $logging; |
||
|
|||
30 | } |
||
31 | |||
32 | |||
33 | /** |
||
34 | * Create log entry if a kernelexception occurs. |
||
35 | * |
||
36 | * @param \Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event |
||
37 | * @return void |
||
38 | */ |
||
39 | public function onKernelException(GetResponseForExceptionEvent $event) |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * Save the log entry (if any) if the error response about to be sent is not handled otherwise. |
||
46 | * |
||
47 | * @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $e |
||
48 | * @return void |
||
49 | */ |
||
50 | public function onKernelResponse(FilterResponseEvent $e) |
||
62 |