1 | <?php |
||
8 | class TimeProfilerSubscriber implements EventSubscriberInterface |
||
9 | { |
||
10 | /** @var float */ |
||
11 | private $startTime = -1; |
||
12 | /** @var float */ |
||
13 | private $profiledTime = -1; |
||
14 | |||
15 | /** |
||
16 | * Returns an array of event names this subscriber wants to listen to. |
||
17 | * |
||
18 | * The array keys are event names and the value can be: |
||
19 | * |
||
20 | * * The method name to call (priority defaults to 0) |
||
21 | * * An array composed of the method name to call and the priority |
||
22 | * * An array of arrays composed of the method names to call and respective |
||
23 | * priorities, or 0 if unset |
||
24 | * |
||
25 | * For instance: |
||
26 | * |
||
27 | * * array('eventName' => 'methodName') |
||
28 | * * array('eventName' => array('methodName', $priority)) |
||
29 | * * array('eventName' => array(array('methodName1', $priority), array('methodName2'))) |
||
30 | * |
||
31 | * @return array The event names to listen to |
||
32 | */ |
||
33 | public static function getSubscribedEvents() |
||
40 | |||
41 | public function start() |
||
45 | |||
46 | public function stop() |
||
50 | |||
51 | public function getProfiledTimestamp() |
||
58 | } |