src/Routing/Dispatcher.php
protected function buildRouteAction(Route $route)
    {
        $action = $route->getAction();

        if ($action instanceof \Closure) {

            $controller = new Controller();

            return $action->bindTo($controller, get_class($controller));
        }

        list ($class, $method) = $action;

        $class = new $class;

        return [$class, $method];
    }
protected function buildRouteAction(Route $route)
    {
        $action = $route->getAction();

        if ($action instanceof \Closure) {

            $controller = new Controller();

            return $action->bindTo($controller, get_class($controller));
        }

        list ($class, $method) = $action;

        $class = new $class;

        return [$class, $method];
    }
protected function buildRouteAction ( Route $ route ) { $ action = $ route -> getAction ( ) ; if ( $ action instanceof \ Closure ) { $ controller = new Controller ( ) ; return $ action -> bindTo ( $ controller , get_class ( $ controller ) ) ; } list ( $ class , $ method ) = $ action ; $ class = new $ class ; return [ $ class , $ method ] ; }
Overwrites buildRouteAction of Trait

@param PHPLegends\Routes\Route $route
@return callable
Overwrites buildRouteAction of Trait