From 32bce09286083d77c3a7a31951a8906d5dd0cddb Mon Sep 17 00:00:00 2001 From: Alexander Strizhak Date: Sat, 24 Apr 2021 01:30:12 +0300 Subject: [PATCH 1/2] add methods for further data collection --- src/EventDispatcher/EventDispatcher.php | 5 +++++ src/Handler/HandlerRegistry.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/EventDispatcher/EventDispatcher.php b/src/EventDispatcher/EventDispatcher.php index 2433eda40..84eef857f 100644 --- a/src/EventDispatcher/EventDispatcher.php +++ b/src/EventDispatcher/EventDispatcher.php @@ -44,6 +44,11 @@ public function setListeners(array $listeners): void $this->classListeners = []; } + public function getListeners(): array + { + return $this->listeners; + } + /** * {@inheritdoc} */ diff --git a/src/Handler/HandlerRegistry.php b/src/Handler/HandlerRegistry.php index bcf97baa3..352d4431b 100644 --- a/src/Handler/HandlerRegistry.php +++ b/src/Handler/HandlerRegistry.php @@ -76,4 +76,9 @@ public function getHandler(int $direction, string $typeName, string $format) return $this->handlers[$direction][$typeName][$format]; } + + public function getHandlers(): array + { + return $this->handlers; + } } From 5ad6ffb811ef42553b68d58ea5149c2d5ee94f38 Mon Sep 17 00:00:00 2001 From: gam6itko Date: Sun, 4 Jul 2021 17:49:27 +0300 Subject: [PATCH 2/2] marked as internal --- src/EventDispatcher/EventDispatcher.php | 3 +++ src/Handler/HandlerRegistry.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/EventDispatcher/EventDispatcher.php b/src/EventDispatcher/EventDispatcher.php index 84eef857f..f3d5363bf 100644 --- a/src/EventDispatcher/EventDispatcher.php +++ b/src/EventDispatcher/EventDispatcher.php @@ -44,6 +44,9 @@ public function setListeners(array $listeners): void $this->classListeners = []; } + /** + * @internal Used for profiling + */ public function getListeners(): array { return $this->listeners; diff --git a/src/Handler/HandlerRegistry.php b/src/Handler/HandlerRegistry.php index 352d4431b..1b8ae94ae 100644 --- a/src/Handler/HandlerRegistry.php +++ b/src/Handler/HandlerRegistry.php @@ -77,6 +77,9 @@ public function getHandler(int $direction, string $typeName, string $format) return $this->handlers[$direction][$typeName][$format]; } + /** + * @internal Used for profiling + */ public function getHandlers(): array { return $this->handlers;