From ae4bfdd16cd153078d8bdaeef64c3becafacd2f0 Mon Sep 17 00:00:00 2001 From: Quentin Burny Date: Mon, 29 Jan 2018 16:22:19 +0100 Subject: [PATCH] Add missing functions in Dispatcher contract (#22951) --- src/Illuminate/Contracts/Bus/Dispatcher.php | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/Illuminate/Contracts/Bus/Dispatcher.php b/src/Illuminate/Contracts/Bus/Dispatcher.php index 3370ad3daf8d..561b25c37870 100644 --- a/src/Illuminate/Contracts/Bus/Dispatcher.php +++ b/src/Illuminate/Contracts/Bus/Dispatcher.php @@ -28,4 +28,28 @@ public function dispatchNow($command, $handler = null); * @return $this */ public function pipeThrough(array $pipes); + + /** + * Determine if the given command has a handler. + * + * @param mixed $command + * @return bool + */ + public function hasCommandHandler($command); + + /** + * Retrieve the handler for a command. + * + * @param mixed $command + * @return bool|mixed + */ + public function getCommandHandler($command); + + /** + * Map a command to a handler. + * + * @param array $map + * @return $this + */ + public function map(array $map); }