From bc675e503a225625b8f757dd827d4efd2d0ce379 Mon Sep 17 00:00:00 2001 From: Mike Lehan Date: Wed, 28 Feb 2024 11:04:04 +0000 Subject: [PATCH] New callable extension added (#1) --- 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); + } +}