Check if the given route name is matching the request route name or alias route names

@return boolean
3551
protected function isMatchingRouteName()
    {
        return $this->getCurrentRouteName() == $this->getRouteName() || array_key_exists($this->getCurrentRouteName(), $this->getAliasRouteNames());
    }
299465
public function name($name){
        return isset($this->routes[$name]) ? $this->routes[$name] : false;
    }
986525
public function checkRoute($uri)
    {
        foreach($this->strings as $expression)
        {
            // check if it matches the pattern
            $this->regex->setPattern($expression);
            if($this->regex->getMatches($uri))
            {
                $this->matchedUriParts = explode('/',$uri);
                return true;
            }
        }
        return false;
    }
530019
public function has($name)
    {
        $names = is_array($name) ? $name : func_get_args();

        foreach ($names as $value) {
            if (! $this->routes->hasNamedRoute($value)) {
                return false;
            }
        }

        return true;
    }
336945
public function matches(Route $route, Request $request)
    {
        $path = $request->path() === '/' ? '/' : '/'.$request->path();

        return preg_match($route->getCompiled()->getRegex(), rawurldecode($path));
    }
611600
public function checkIfAliasExists($name){

        if( isset($this->aliases[$name]) ){
            return true;
        }

        $aliasPath = vibius_BASEPATH.$this->aliasCache.$name.".php";
        if( file_exists($aliasPath) ){
            $this->aliases[$name] = true;
            return true;
        }
    }
135690
public function matches(Route $route, Request $request)
    {
        return in_array($request->getMethod(), $route->methods());
    }
282509
private function matchExact(): bool
    {
        foreach ($this->routesExact as $route) {
            if ($this->uri === $route['u']) { // compare the current URI array to this route URI array
                $this->control = $route['c']; // set control or this exact match

                return true; // exact match found
            }
        }

        return false; // exact match not found
    }
420810
protected function hasRoutingConfig()
    {
        $has_config = false;

        if ($this->locator) {
            try {
                $routing_file = $this->locator->locate($this->getRoutingFilename());

                if (filesize($routing_file) > 0) {
                    $this->debug(sprintf('hasRoutingConfig: Located Routing File %s', $routing_file));
                    $has_config = true;
                }
            } catch (\InvalidArgumentException $e) {}
        }

        return($has_config);
    }
1239473
public function filterMatch($patterns)
    {
        $patterns = is_string($patterns) ? [$patterns] : $patterns;

        // String pattern is assumed to be path.
        foreach ($patterns as $key => $pattern) {
            if (is_string($pattern)) {
                $patterns[$key] = ['path' => $pattern];
            }
        }

        return $this->filter(function ($route) use ($patterns) {
            // If any of patterns matches - route passes.
            foreach ($patterns as $pattern) {
                if ($this->isRouteMatchesPattern($route, $pattern)) {
                    return true;
                }
            }

            // If all patterns don't match - route is filtered out.
            return false;
        });
    }
1355014
public function hasRoutes(string $name): bool{
        return (isset($this->routes[$name]) && !empty($this->routes[$name]));
    }
1170224
private function matchVariable(): bool
    {
        foreach ($this->routesVariable as $route) {
            $this->matchVariableVars($route['u']); // find variables
            if (empty($this->vars)) {
                continue; // no variable match yet
            }
            $this->control = $route['c']; // set control for this variable match

            return true; // variable match found
        }

        return false; // variable match not found
    }
1018035
protected function _routes() {

        if(!isset($this->config['match'])) {
            return null;
        }
        $match = $this->config['match'];
        if(is_string($match)) {
            return include $match;
        }
        return $match;
    }
174773
protected function aliasMiddleware()
    {
        $router = $this->app['router'];

        $method = method_exists($router, 'aliasMiddleware') ? 'aliasMiddleware' : 'middleware';

        foreach ($this->middlewareAliases as $alias => $middleware) {
            $router->$method($alias, $middleware);
        }
    }
662790
private function isRequestAcceptedForRoute($route)
    {
        $acceptedFormats = $route['acceptedRequestFormats'];
        if (is_null($acceptedFormats)) {
            return true;
        }
        if (is_array($acceptedFormats)) {
            foreach ($acceptedFormats as $format) {
                if (strpos($this->requestedRepresentation, $format) !== false) {
                    return true;
                }
            }
            return false;
        }
        return strpos($this->requestedRepresentation, $acceptedFormats) !== false;
    }
140866
protected function parseAlias()
    {
        if ( $alias = $this->getAction('protect_alias') ) {
            return $alias;
        }

        $action = $this->request->route()->getActionName();

        $ctrl = preg_match('/([^@]+)+/is', $action, $m) ? $m[1] : $action;
        $name = last(explode('\\', $ctrl));
        $name = str_replace('controller', '', strtolower($name));
        $name = str_singular($name);

        return $name;
    }
117661
private function getRedirectRouteFromRequest()
    {
        $request  = $this->application->getRequest();
        $redirect = $request->getQuery('redirect');
        if ($redirect && $this->routeExists($redirect)) {
            return $redirect;
        }

        $redirect = $request->getPost('redirect');
        if ($redirect && $this->routeExists($redirect)) {
            return $redirect;
        }

        return false;
    }