From 6ea2f76fab7fb2848247c000326d038fbd7b33d1 Mon Sep 17 00:00:00 2001 From: Devon Bagley Date: Wed, 28 Mar 2018 17:12:22 -0700 Subject: [PATCH] Provide *details* argument to callback function If the router supports wildcard registration the registered rpc may need to use the procedure uri. This is available on the details argument. --- src/Vinelab/Minion/Client.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Vinelab/Minion/Client.php b/src/Vinelab/Minion/Client.php index 95173bb..a831842 100644 --- a/src/Vinelab/Minion/Client.php +++ b/src/Vinelab/Minion/Client.php @@ -244,13 +244,15 @@ public function wrapWithProxy($callback, $isFunction = false) // We will wrap the callback with a Closure so that we can format the kwArgs that we receive // into our proprietary Dictionary instance to make things safer. - return function ($args, $kwArgs) use ($callback, $isFunction, $provider) { + return function ($args, $kwArgs, $details) use ($callback, $isFunction, $provider) { if (is_string($callback) && !$isFunction && $provider instanceof Provider) { $callback = [$provider, $callback]; } - return call_user_func_array($callback, [$args, Dictionary::make($kwArgs)]); + $params = [$args, Dictionary::make($kwArgs), Dictionary::make($details)]; + + return call_user_func_array($callback, $params); }; } }