Changed Stopwatch service to a factory.

This commit is contained in:
Andrey Savchenko committed 2018-02-08 16:20:30 +02:00
1 parent 054bf2e0df
commit c93249875b
2 files changed
+8 -3

No files matched your search

+6 -1
View File
@@ -8,7 +8,7 @@ use Rarst\Laps\Bootable_Provider_Interface;
use Rarst\Laps\Laps;
use Symfony\Component\Stopwatch\Stopwatch;
class Http_Events_Provider implements ServiceProviderInterface, Bootable_Provider_Interface {
class Http_Events_Provider implements ServiceProviderInterface, Bootable_Provider_Interface, Events_Provider_Interface {
/** @var Stopwatch $stopwatch */
protected $stopwatch;
@@ -58,4 +58,9 @@ class Http_Events_Provider implements ServiceProviderInterface, Bootable_Provide
return $response;
}
public function get_events() {
return $this->stopwatch->getSectionEvents( '__root__' );
}
}