Receives a named route and returns true or false depending
if the current URL is equal to the named route provided.

@param 	string				$route
@param 	string|NULL		$active
@return	string
2711
public function isRoute($route, $active = NULL)
	{
		$this->setActive($active);
		return ($this->request->routeIs($route) ? $this->active : '');
	}
199762
public static function get_active_route_name($match, $active = 'active')
    {
        $route_name = Route::currentRouteName();
        return (strcasecmp(static::get_base_route_name($route_name), $match) == 0) ? $active : '';
    }
1322725
public static function isStaticRoute(string $route): bool
    {
        return \strpos($route, '{') === false && \strpos($route, '[') === false;
    }
853197
private function getRouteName(Route $route)
    {
        return is_null($name = $route->getName()) ? $route->uri() : $name;
    }
1043117
public function match(MainRouter $router, $route = null)
    {
        $route = $route ?: $this->app->uri->route;
        $route = $route ?: '/';

        $input   = $this->app->input;
        $request = $this->app->request;

        if ($request->hasHeader('X-HTTP-Method-Override')) {
            $method = $request->getHeaderLine('X-HTTP-Method-Override');
        } else {
            $method = $input->get('_method') ?: $input->getMethod();
        }

        // Pass variables to custom method
        if ($input->$method) {
            $httpMethod = $input->getMethod();

            $input->$method->setData($input->$httpMethod->toArray());
        }

        // Prepare option data
        $uri = $request->getUri();

        $options = [
            'scheme' => $uri->getScheme(),
            'host' => $uri->getHost(),
            'port' => $uri->getPort(),
        ];

        try {
            return $router->match($route, $method, $options);
        } catch (RouteNotFoundException $e) {
            // If simple_route is disabled, just continue throw the exception.
            if (!$this->app->get('routing.simple_route', false)) {
                throw $e;
            }

            // Simple routing
            $matched = $this->matchSimpleRouting($route, $method, $router);

            if ($matched === false) {
                throw new RouteNotFoundException($e->getMessage(), $e->getCode(), $e);
            }

            return $matched;
        }
    }
502990
protected function generateRouteUrl($route = null)
    {
        if (null === $route || strpos($route, '/') !== 0) {
            return $route;
        }

        if (null === $this->getRouteMatch()) {
            throw new Exception\RuntimeException('No RouteMatch instance provided');
        }

        $routeName = $this->getRouteMatch()->getMatchedRouteName();

        if ($routeName === null) {
            throw new Exception\RuntimeException('RouteMatch does not contain a matched route name');
        }

        $position = strpos($routeName, '/');

        if ($position !== false) {
            /**
             * If we request the name /, it will mean that we need to only get
             * the root part of the route without any other module route params
             */
            if ('/' === $route) {
                $results = substr($routeName, 0, $position);
            } else {
                $results = substr($routeName, 0, $position) . $route;
            }
        } else {
            if ('/' === $route) {
                $results = $routeName;
            } else {
                $results = $routeName . $route;
            }
        }

        return $results;
    }
947258
public function get(string $name){
        foreach($this->routes as $route){
			if($route->matchName($name))
				return $route;
		}
		return null;
    }
338889
protected function getRouteCallExampleResponse($route, $method)
	{
		$url = $this->getRouteUrlWithBindings($route);
		
		$response = $this->callRoute($method, $url, []);
		
		if (is_null($response)) {
			return null;
		}

		if (is_object($response)) {
			$response = $response->content();
		}

		return $response;
	}
571767
public function hasRoute(string $route): bool
    {
        foreach ($this->getActions() as $action) {
            if ($action->getRouteName() === $route) {
                return true;
            }
        }

        return false;
    }
291738
private function checkRouteNameIsUnique(
        RouteInterface $route,
        array $namedRouteUriPaths,
        ?string &$url,
        ?string &$otherUrl
    ): bool {
        // check is really simple, the main purpose of the method is to prepare data for assert
        $isUnique = array_key_exists($route->getName(), $namedRouteUriPaths) === false;

        $url      = $isUnique === true ? null : $route->getUriPath();
        $otherUrl = $isUnique === true ? null : $namedRouteUriPaths[$route->getName()];

        return $isUnique;
    }
1160379
public function getControllerFromRoute(Route $route)
    {
        $ret = false;
        $actionParts = explode(':', $route->getDefault('_controller'));

        if (count($actionParts) == 2) {
            $ret = $this->container->get($actionParts[0]);
        }

        return $ret;
    }
526951
public static function getRoute($route, $method=null) {
// 		$routes	= static::getRoutes();
		if( $method ) {
			return isset(static::$routes[$route][$method]) ? static::$routes[$route][$method] : null;
		}
		foreach( static::getKnownMethods() as $method ) {
			if( isset(static::$routes[$route][$method]) ) {
				return static::$routes[$route][$method];
			}
		}
		return null;
	}
323256
public static function get( $route = null, $callback = null ) {
		// Make sure that our parameters are what they say they are
		$args = self::smart_parameters( func_get_args() );

		return self::route( 'GET', $args[ 'route' ], $args[ 'callback' ] );
	}
1325508
public function baseRoute($route)
    {
        if(strpos($route, '@') === 0) {
            $route = substr($route, 1, strlen($route)-1);
        } else {
            $baseRoute = $this->route->getParentRouteName();
            $route		= $baseRoute ? $baseRoute.'.'.$route : $route;
        }

        return $route;
    }
285416
protected function getUrl($route, $params = array())
    {
        $urlHelper = $this->getView()->plugin('url');

        if ('#' === $route[0]) {
            return $route;
        }

        return $urlHelper($route, $params, $this->getRouteOptions());
    }
964028
public static function getRouteByName(string $name) : Route
    {
        foreach (static::$routes as $routes) {
            /** @var Route $route */
            foreach ($routes as $route) {
                if ($route->getName() === $name) {
                    return $route;
                }
            }
        }

        return null;
    }
226693
public static function getRouteByName($name, $parameters = [], $absolute = true) {
		foreach ( self::$routes as $routePath => $routeDetails ) {
			if (self::checkRouteName ( $routeDetails, $name )) {
				if (\sizeof ( $parameters ) > 0)
					$routePath = self::_getURL ( $routePath, $parameters );
				if (! $absolute)
					return \ltrim ( $routePath, '/' );
				else
					return $routePath;
			}
		}
		return false;
	}