public function closure($closure)
    {
        // Retrieving the class and method to launch.
        if (!is_callable($closure)) {
            return null;
        }

        $injections = $this->injectorForClosure($closure);

        return [
            'action' => $closure,
            'injection' => $injections
        ];
    }
public function closure($closure)
    {
        // Retrieving the class and method to launch.
        if (!is_callable($closure)) {
            return null;
        }

        $injections = $this->injectorForClosure($closure);

        return [
            'action' => $closure,
            'injection' => $injections
        ];
    }
public function closure ( $ closure ) { // Retrieving the class and method to launch. if ( ! is_callable ( $ closure ) ) { return null ; } $ injections = $ this -> injectorForClosure ( $ closure ) ; return [ 'action' => $ closure , 'injection' => $ injections ] ; }
Load the closure define as action

@param \Closure $closure

@return array
Load the closure define as action