From 54f48a33a874694fe8fd7e1e43286551dbb6741d Mon Sep 17 00:00:00 2001 From: m1ke Date: Wed, 28 Feb 2024 10:39:06 +0000 Subject: [PATCH] New callable extension added --- src/Extensions/CallableExtension.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/Extensions/CallableExtension.php diff --git a/src/Extensions/CallableExtension.php b/src/Extensions/CallableExtension.php new file mode 100644 index 0000000..03ff2dc --- /dev/null +++ b/src/Extensions/CallableExtension.php @@ -0,0 +1,28 @@ +callable = $callable; + } + + public function apply(Event $event, Throwable $exception, ?ServerRequestInterface $request): void { + $callable = $this->callable; + $callable($event, $exception, $request); + } +}