protected function resolveCompositeBinding($vars)
    {
        $keys = array_keys($vars);

        foreach ($this->compositeBindings as $binding) {
            if ($keys === $binding[0]) {
                $binder = $binding[1];
                $errorHandler = $binding[2];

                $callable = $this->getBindingCallable($binder, null);
                $r = $this->callBindingCallable($callable, $vars, $errorHandler, true);

                if (!is_array($r) || count($r) !== count($vars)) {
                    throw new Exception("Route-Model-Binding (composite-bind) : Return value should be an array and should be of the same count as the wildcards!");
                }

                // Combine the binding results with the keys
                return array_combine($keys, array_values($r));
            }
        }
    }
protected function resolveCompositeBinding($vars)
    {
        $keys = array_keys($vars);

        foreach ($this->compositeBindings as $binding) {
            if ($keys === $binding[0]) {
                $binder = $binding[1];
                $errorHandler = $binding[2];

                $callable = $this->getBindingCallable($binder, null);
                $r = $this->callBindingCallable($callable, $vars, $errorHandler, true);

                if (!is_array($r) || count($r) !== count($vars)) {
                    throw new Exception("Route-Model-Binding (composite-bind) : Return value should be an array and should be of the same count as the wildcards!");
                }

                // Combine the binding results with the keys
                return array_combine($keys, array_values($r));
            }
        }
    }
protected function resolveCompositeBinding ( $ vars ) { $ keys = array_keys ( $ vars ) ; foreach ( $ this -> compositeBindings as $ binding ) { if ( $ keys === $ binding [ 0 ] ) { $ binder = $ binding [ 1 ] ; $ errorHandler = $ binding [ 2 ] ; $ callable = $ this -> getBindingCallable ( $ binder , null ) ; $ r = $ this -> callBindingCallable ( $ callable , $ vars , $ errorHandler , true ) ; if ( ! is_array ( $ r ) || count ( $ r ) !== count ( $ vars ) ) { throw new Exception ( "Route-Model-Binding (composite-bind) : Return value should be an array and should be of the same count as the wildcards!" ) ; } // Combine the binding results with the keys return array_combine ( $ keys , array_values ( $ r ) ) ; } } }
Check for and resolve the composite bindings if a match found

@param  array $vars  the wildcards array

@return array|null   the wildcards array after been resolved, or NULL if no match found
Check for and resolve the composite bindings if a match found