Conditions | 4 |
Paths | 3 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function onKernelController(FilterControllerEvent $event) |
||
26 | { |
||
27 | $controller = $event->getController(); |
||
28 | |||
29 | if (!$event->isMasterRequest() || !is_array($controller)) { |
||
30 | return false; |
||
31 | } |
||
32 | |||
33 | list($class, $method) = $controller; |
||
34 | |||
35 | $controllerReflection = new \ReflectionObject($class); |
||
36 | $methodReflection = $controllerReflection->getMethod($method); |
||
37 | $annotation = $this->reader->getMethodAnnotation($methodReflection, LogHttpTransaction::class); |
||
38 | |||
39 | if ($annotation) { |
||
40 | $request = $event->getRequest(); |
||
41 | $this->transactionLogger->setRequest($request); |
||
42 | } |
||
43 | |||
44 | return true; |
||
45 | } |
||
46 | } |
||
47 |