| 1 | <?php |
||
| 12 | class StopwatchEventSubscriber implements EventSubscriberInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * {@inheritdoc} |
||
| 16 | */ |
||
| 17 | 7 | public static function getSubscribedEvents() |
|
| 24 | |||
| 25 | /** |
||
| 26 | * A stopwatch object which exposes a start($name) and a stop($name) method. |
||
| 27 | * |
||
| 28 | * @var object |
||
| 29 | */ |
||
| 30 | private $stopwatch; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var object |
||
| 34 | */ |
||
| 35 | private $rootObject; |
||
| 36 | |||
| 37 | 1 | public function __construct($stopwatch) |
|
| 38 | { |
||
| 39 | 1 | $this->stopwatch = $stopwatch; |
|
| 40 | 1 | } |
|
| 41 | |||
| 42 | 1 | public function onPreSerialize(ObjectEvent $event) |
|
| 51 | |||
| 52 | 1 | public function onPostSerialize(ObjectEvent $event) |
|
| 61 | } |
||
| 62 |