Is this route callable?

@return bool
161819
public function isCallable() : bool 
    {
        return is_callable(
            [
                $this->namespace . $this->getController(true),
                $this->getAction(true)
            ]
        );
    }
361682
private function specificRouteRestrictionExists()
    {
        $requestMethod = isset($_POST['_method']) ? $_POST['_method'] : $_SERVER['REQUEST_METHOD'];
        
        $routes = app('router')->getRoutes()->match(app('request')->create($_SERVER['REQUEST_URI'], $requestMethod));


        if (!$routes) {
            throw new Exception('Error determining current route.');
        }

        if (get_class($routes) != \Illuminate\Routing\Route::class && count($routes) != 1) {
            $routes = $routes->first();
        }
        
        foreach($routes->middleware() as $routeMiddleware) {
            $routeMiddlewareParts = explode(':', $routeMiddleware);
            if ($routeMiddlewareParts[0]=='routeRestrictor') {
                return true;
            }
        }

        return false;
    }
347345
public function execute()
    {
        // Check if we have a url
        if (!$this->url || trim($this->url) == '') {
            $this->url = '/';
        }

        // Make sure the url starts with a slash
        if (substr($this->url, 0, 1) !== '/') {
            $this->url = '/' . $this->url;
        }

        // Check if the absolute route exists in our routes array
        // - and if that route has the same type of request as the current request.
        if (isset($this->routes[$this->method][$this->url])) {
            return call_user_func_array($this->routes[$this->method][$this->url], []);
        }

        // Check if the absolute route exists in our routes array
        // - and if that route has the "any" type.
        if (isset($this->routes['any'][$this->url])) {
            return call_user_func_array($this->routes['any'][$this->url], []);
        }

        // Create an array of methods to check and loop through them
        $methods = [$this->method, 'any'];
        foreach ($methods as $method) {
            // Loop through the routes set for this method
            foreach ($this->routes[$method] as $route => $callable) {
                // Check if the route matches
                $regex = '/^' . str_replace('/', '\/', $route) . '/Uim';
                $matches = [];
                if (preg_match($regex, $this->url, $matches) === 1 && $matches[0] === $this->url) {
                    // First value in the array is the string that matched
                    array_shift($matches);

                    // Execute the callable method
                    return call_user_func_array($callable, $matches);
                }
            }
        }

        // No route found, check if we have an empty route.
        // - We should always have an empty route.
        if (!isset($this->routes['any']['/'])) {
            header('HTTP/1.1 404 Not Found');
            exit;
        }

        // Return the empty route's callable
        return call_user_func_array($this->routes['any']['/'], []);
    }
260192
public function currentRouteAction()
    {
        if (! $route = $this->current()) {
            return;
        }

        $action = $route->getAction();

        return is_string($action['uses']) ? $action['uses'] : null;
    }
884431
public function isRouteAllowed()
	{
		return $this->_redirected || in_array(Request::getRequestMethod(), $this->getRoute()->getMethods()) === true;
	}
1095847
protected function runCallable()
    {
        $callable = $this->action['uses'];

        $parameters = $this->resolveMethodDependencies(
            $this->parametersWithoutNulls(), new ReflectionFunction($callable)
        );

        return call_user_func_array($callable, $parameters);
    }
64920
private function checkMethod() {
        if (strpos(self::$currentRoute['method'], '|') !== false) {
            if (!in_array($_SERVER['REQUEST_METHOD'], explode('|', self::$currentRoute['method']))) {
                throw new RouteException(_message(ExceptionMessages::INCORRECT_METHOD, $_SERVER['REQUEST_METHOD']));
            }
        } else if ($_SERVER['REQUEST_METHOD'] != self::$currentRoute['method']) {
            throw new RouteException(_message(ExceptionMessages::INCORRECT_METHOD, $_SERVER['REQUEST_METHOD']));
        }
    }
1023258
protected function isValidRoute()
    {
        try {

            $current = Route::current();
            if (!$current) {
                return false;
            }
            $action = $current->action;
            $as     = array_get($action, 'as');
            return str_contains($as, 'show') or str_contains($as, 'dashboard');
        } catch (Exception $ex) {
            return false;
        }
    }
983138
public function isDisplayable() {
        $displayable = $this->enable && $this->visible;
        if (true === $displayable) {
            return true;
        }
        foreach ($this->getNodes() as $current) {
            if (false === ($current instanceof AbstractNavigationNode)) {
                continue;
            }
            if (true === $current->isDisplayable()) {
                return true;
            }
        }
        return $displayable;
    }
131358
public function matchRoute()
	{

		//check if this route key exists
		$RouteMatch = (ArrayHelper::KeyExists($this->UrlParserObjectInstance->getController(), $this->definedRoutesArray)->get()) ? true : false;

		//a matching route was found, set params and return true
		if($RouteMatch)
		{
			//set the value of the routeName
			$this->routeName = $this->UrlParserObjectInstance->getController();

			//get metaData for this route
			$this->routeMetaData = $this->definedRoutesArray[$this->UrlParserObjectInstance->getController()];

			//return true
			return true;

		}

		//not matching route was found, return fasle
		else{

			//return false
			return false;

		}

	}
570445
public function isObjViewable()
    {
        $model = ($this->currentObj) ? $this->currentObj : $this->proto();
        if (!$model->id()) {
            return false;
        }

        $method = [ $model, 'isViewable' ];
        if (is_callable($method)) {
            return call_user_func($method);
        }

        return true;
    }
886697
public function canBeShowed(): bool
    {
        return ($this->mixed instanceof Collection || $this->mixed instanceof \Countable || is_int($this->mixed));
    }
1323128
public static function dispatch() {
        self::$_config = MRest::getConfig('routing');

        $routeData = self::_callDispatcher(self::$_config['dispatcher']);

        if (!class_exists($routeData['class']) || !(new \ReflectionClass($routeData['class']))->isInstantiable()) {
            throw new \Exception('Application class [' . $routeData['class'] . '] was not found', 404);
        }
        $class = new $routeData['class']();

        if (!is_callable([$class, $routeData['method']])) {
            throw new \Exception('Method [' . $routeData['method'] . '] not allowed', 405);
        }

        return call_user_func_array([$class, $routeData['method']], $routeData['attributes']);
    }
804470
public function is()
    {
        $patterns = func_get_args();

        $name = $this->currentRouteName();

        foreach ($patterns as $pattern) {
            if (Str::is($pattern, $this->currentRouteName())) {
                return true;
            }
        }

        return false;
    }
222824
public function currentRouteAction()
    {
        if (! is_null($route = $this->current())) {
            $action = $route->getAction();

            return isset($action['controller']) ? $action['controller'] : null;
        }
    }
790085
public function execute()
    {
        $request = $this->get('request');
        $router = $this->get('router');
        $response = $this->get('response');

        // Attempt to match the requested route with a registered route
        if ($router->matchRequest($request->route(), $request->httpMethod())) {

            // A match was found - pass any route params to the Request instance
            $request->routeParams($router->params());

            // The closure associated with the matched route
            $closure = $router->getClosure($this);

            // Attempt to call the closure
            if ($closure) {
                // Call the output
                $closure($request, $response);
            } else {
                // There was a problem calling the route's closure
                $response->send(500, 'This route\'s callback is invalid.');
            }

        } else {

            // A route wasn't matched - return a 404
            $response->send(404, 'The requested resource was not found.');
        }
    }
1033899
public function processTasks()
    {
        /** @var TaskInterface $task */
        foreach ($this->tasks as $task) {
            $callable = new $task();

            $result = call_user_func(
                $callable, $this->route, $this->console, $this->params
            );

            if (1 === $result) {
                return false;
            }
        }

        return true;
    }