src/Viserio/Component/Routing/Router.php
protected function createRoute($methods, string $uri, $action): RouteContract
    {
        // If the route is routing to a controller we will parse the route action into
        // an acceptable array format before registering it and creating this route
        // instance itself. We need to build the Closure that will call this out.
        if ($this->actionReferencesController($action)) {
            $action = $this->convertToControllerAction($action);
        }

        $route = new Route($methods, $this->prefix($this->suffix($uri)), $action);

        if ($this->container !== null) {
            $route->setContainer($this->container);
        }

        $route->setInvoker($this->getInvoker());

        if ($this->hasGroupStack()) {
            $this->mergeGroupAttributesIntoRoute($route);
        }

        $this->addWhereClausesToRoute($route);

        foreach ($this->globalParameterConditions as $key => $value) {
            $route->addParameter($key, $value);
        }

        return $route;
    }
protected function createRoute($methods, string $uri, $action): RouteContract
    {
        // If the route is routing to a controller we will parse the route action into
        // an acceptable array format before registering it and creating this route
        // instance itself. We need to build the Closure that will call this out.
        if ($this->actionReferencesController($action)) {
            $action = $this->convertToControllerAction($action);
        }

        $route = new Route($methods, $this->prefix($this->suffix($uri)), $action);

        if ($this->container !== null) {
            $route->setContainer($this->container);
        }

        $route->setInvoker($this->getInvoker());

        if ($this->hasGroupStack()) {
            $this->mergeGroupAttributesIntoRoute($route);
        }

        $this->addWhereClausesToRoute($route);

        foreach ($this->globalParameterConditions as $key => $value) {
            $route->addParameter($key, $value);
        }

        return $route;
    }
Create a new route instance.

@param array|string $methods
@param string       $uri
@param mixed        $action

@return \Viserio\Component\Contract\Routing\Route