1 | <?php |
||
14 | class StopwatchListener implements EventSubscriberInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var Stopwatch |
||
18 | */ |
||
19 | private $stopwatch; |
||
20 | |||
21 | /** |
||
22 | * @param Stopwatch $stopwatch |
||
23 | */ |
||
24 | public function __construct(Stopwatch $stopwatch) |
||
28 | |||
29 | /** |
||
30 | * @param FilterResponseEvent $event |
||
31 | */ |
||
32 | public function onKernelResponse(FilterResponseEvent $event) |
||
45 | |||
46 | /** |
||
47 | * @return array |
||
48 | */ |
||
49 | public static function getSubscribedEvents() |
||
55 | |||
56 | /** |
||
57 | * Sets the header for the specified stage (eg X-API-RESPONSE-GET-VIDEOS). |
||
58 | * |
||
59 | * @param Response $response |
||
60 | * @param string $stage |
||
61 | * @param int $duration |
||
62 | */ |
||
63 | private function setHeader(Response $response, $stage, $duration) |
||
68 | } |
||
69 |