Alias for the "currentRouteUses" method.

@param  mixed  string
@return bool
349249
public function uses()
    {
        foreach (func_get_args() as $pattern) {
            if (str_is($pattern, $this->currentRouteAction())) {
                return true;
            }
        }
        
        return false;
    }
543779
public static function current()
        {
            if ( ! is_null(static::$uri)) {
                return static::$uri;
            }

            // We'll simply get the path info from the Symfony Request instance and then
            // format to meet our needs in the router. If the URI is root, we'll give
            // back a single slash, otherwise we'll strip all of the slashes off.
            $uri = static::format(Request::getPathInfo());

            static::segments($uri);

            return static::$uri = $uri;
        }
1137371
public function seeCurrentRouteIs($routeName, array $params = [])
    {
        $router = $this->client->grabServiceFromContainer('router');
        $url = $router->assemble($params, ['name' => $routeName]);
        $this->seeCurrentUrlEquals($url);
    }
1309910
public function isCurrent()
    {
        $link = $this->getLink();
        if ($link{0} == '/') {
            $link = substr($link, 1);
        }

        return request()->is($link);
    }
437432
protected function rewriteRoutingSetUpCurrentRouteByRequest () {
		$request = & $this->request;
		$toolClass = self::$toolClass;
		$this->currentRoute
			->SetController(str_replace(['/', '\\\\'], ['\\', '//'],
				$toolClass::GetPascalCaseFromDashed($request->GetControllerName())
			))
			->SetAction(
				$toolClass::GetPascalCaseFromDashed($request->GetActionName())
			);
	}
571767
public function hasRoute(string $route): bool
    {
        foreach ($this->getActions() as $action) {
            if ($action->getRouteName() === $route) {
                return true;
            }
        }

        return false;
    }
1075100
public static function getRouteByAlias($alias)
    {
        //No routes
        if (empty(self::$routes)) {
            return;
        }

        //Search in the map
        $route = null;

        if (($index = array_search($alias, array_column(self::$routes, 'alias'))) !== false) {
            $route = self::$routes[$index]['route'];
        }

        return $route;
    }
950724
public static function getCurrentRoute()
    {
        $current = null;
        $request = Request::current();
        $routeStr = $request->getRouteStr();
        $method = $request->getMethod();

        //Search for the route
        foreach (self::$routes as $route) {
            //Check the method
            if (!in_array($method, $route['methods'])) {
                continue;
            }

            //Check number of slashes
            if (
                substr_count($route['route'], '/')
                != substr_count($routeStr, '/')
            ) {
                continue;
            }

            //Checks the route string
            if (
                ParametrizedString
                    ::make($route['route'])
                    ->matches($routeStr)
            ) {
                $current = $route;
                break;
            }
        }

        return $current;
    }
1072193
protected function currentUrlMatches()
    {
        if ($this->url() == Request::url()) { // If URLs are equal, always return true
            return true;
        }

        if ($this->activeUrlPattern) { // If pattern was set, see if it matches
            $pattern = ltrim(preg_replace('/\/\*/', '(/.*)?', $this->activeUrlPattern), '/');
            return preg_match("@^{$pattern}\z@", Request::path());
        }

        return false; // No match
    }
1131345
public function detectCurrentRoute($declaration, $method) {
        foreach($this->routes as $i => $route) {
            if(preg_match("#^" . $route["url"] . "$#", $declaration, $matches, PREG_OFFSET_CAPTURE)) {
                $this->routeFound = true;
                $this->methodsAvailable[] = $route["method"];

                if($method != $route["method"]) {
                    continue;
                }

                array_shift($matches);

                foreach($matches as $k => $match) {
                    $route["expressions"][$k]["value"] = $match[0];
                }

                $this->currentRoute = $route;
                return true;
            }
        }

        return false;
    }
557481
public function currentPageUrl($parameters = [], $routePersistence = true)
    {
        if (!$currentFile = $this->page->getFileName()) {
            return null;
        }

        return $this->pageUrl($currentFile, $parameters, $routePersistence);
    }
1131085
protected function currentAction()
    {
        $action = substr($action = Route::currentRouteAction(), strpos($action, '@') + 1);

        if (!method_exists($this, $action)) {
            $action = 'index';
        }

        return $action;
    }
606852
public function isCurrent()
    {
        $request = Injector::inst()->get(HTTPRequest::class);
        $tag = $request->getVar("t");

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

            return isset($action['controller']) ? $action['controller'] : null;
        }
    }
113961
public function isRouteName($name)
    {
        if (!$request = $this->requestStack->getMasterRequest()) {
            return false;
        }

        return $name === $request->get('_route');
    }
222924
public function linksToCurrentPage(array $arguments) {
        return
            URL::current() == URL::route($this->action->getName(), $this->action->getRouteParameters($arguments)) &&
            Request::method() == $this->action->getMethod();
    }
770326
function isCurrentAction( $actionName, $view = '' )
    {
        if ( $view == '' )
            $view = self::currentView();
        if ( $view == '' or $actionName == '' )
            return false;
        return $this->currentAction( $view ) == $actionName;
    }