Creates a route using given params

@param array $methods
@param string $name
@param string $path
@param mixed $target
@param array $matchers
@return Route
438242
protected function createRoute(array $methods, string $name, string $path, $target, array $matchers = []) : Route
    {
        $builder = RouteBuilder::route($this->defaultRouteClass);

        $builder->from($path)->to($target);

        foreach ($methods as $method) {
            $builder->accepting($method);
        }

        $builder->named($name);

        foreach ($matchers as $param => $paramMatchers) {
            foreach ($paramMatchers as $matcher) {
                $builder->ifMatches($param, $matcher);
            }
        }

        return $builder->build();
    }
38482
public function patch(string $name, string $path, $target, array $matchers = []) : self
    {
        $route = $this->createRoute([RequestMethodInterface::METHOD_PATCH], $name, $path, $target, $matchers);
        $this->addRoute($route);
        return $this;
    }
1318730
protected function handle(string $path, callable $action, $method, string $name = null): HttpRoute
    {
        if (!is_array($method)) {
            $method = [$method];
        }
        /** @var HttpRoute $route */
        $route = $this->data->createRoute($this->prefix . $path, $action, $name);
        $route->method(...$method);
        return $route;
    }
577730
private function createMatchContextFromParameters(array $vars, $name, $request)
    {
        $handler = $this->routes->get($name)->getHandler();

        return new MatchContext(Matcher::MATCH, $name, $request, $handler, $vars);
    }
752293
protected function newRoute( $methods, $uri, $action )
	{
		return ( new Route( $methods, $uri, $action ) )->setRouter( $this );
	}
909911
public static function createFromPath(
        $path,
        $method = 'GET',
        $query = [],
        $post = []
    ) {
        $request = new ServerRequest(
            [],
            [],
            new Uri($path),
            $method ?: 'GET',
            'php://input',
            []
        );

        return $request
            ->withQueryParams($query)
            ->withParsedBody($post);
    }
214971
public function match($path, $method=null)
    {
        foreach($this->routes as $pattern => $handler) {

            if ($params = Matcher::verify($pattern, $path, $method)) {
                if ($handler instanceof Handler) {
                    $handler = $handler->params($params);
                    $data    = $handler->data;
                    $data['path'] = $path;
                    $data['method'] = $method;
                    return new Route($data);
                }
                return [$handler, $params];
            }
        }
        return null;
    }
136593
public function add($pattern, $paths = null, $method = null)
    {
        return $this->_addRoute($pattern, $paths, $method);
    }
188139
public function route($name, $pattern, $controller, array $arguments = [], array $methods = [])
    {
        $this->router()->register($name, new Route($pattern, $controller, $arguments, $methods));

        return $this;
    }
44379
protected function createRoute($methods, $uri, $action)
	{
		// 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->routingToController($action))
		{
			$action = $this->getControllerAction($action);
		}

		$route = $this->newRoute(
			$methods, $uri = $this->prefix($uri), $action
		);

		$route->where($this->patterns);

		// If we have groups that need to be merged, we will merge them now after this
		// route has already been created and is ready to go. After we're done with
		// the merge we will be ready to return the route back out to the caller.
		if (count($this->groupStack) > 0)
		{
			$this->mergeController($route);
		}

		return $route;
	}
1250681
public function match($path, $method, $action = null)
    {
        $rule = new HttpMethodRule();
        $rule->setPath($path);
        $rule->setMethod($method);
        $rule->setAction($action);
        $rule->setGroup($this);
        $this->children[] = $rule;
        return $rule;
    }
386868
function route(
    $path = '/', $actions, $method = Router::ANY_METHOD, $name = null, array $filters = [], array $events = []
    )
    {
        if (is_array($path)) {
            foreach ($path as $p) {
                $this->collection[$name ?: count($this->collection)] = (new Route($this->Parser))
                        ->route($p, is_array($actions) ? $actions : [$actions], $method, $name, $filters, $events);
            }
        } else {
            $this->collection[$name ?: count($this->collection)] = (new Route($this->Parser))
                    ->route($path, is_array($actions) ? $actions : [$actions], $method, $name, $filters, $events);
        }

        return $this;
    }
818528
public function fromRoute($name, array $params = [])
    {
        $router = $this->getRouter();
        $route  = $router->get($name);

        return $route->assemble($params);
    }
1003768
protected function createRoute($methods, $pattern, $callable)
	{
		$route = new Route($methods, $pattern, $callable, $this->routeGroups, $this->routeCounter);
		
		return $route;
	}
448584
protected function newMethodSegment($name, array $arguments = [])
    {
        return $this->provider->createQueryable($this->newMethod($name, $arguments));
    }
196280
public function map(array $methods, string $pattern, $callable): MethodsInterface
    {
        // Check if method in allowed list
        $methods = $this->checkMethods($methods);

        // Set new route with parameters
        $this->set($methods, [$pattern, $callable]);

        return $this;
    }
1369502
public function create(
        string $method,
        string $definition,
        RequestHandlerInterface $handler,
        ?string $name,
        $data
    ): Route {
        if (!Method::isValid($method)) {
            throw InvalidRoute::invalidMethod($method);
        }

        $path = $this->parser->parse($definition, $this->types);

        return new Route($method, $path, $handler, $name, $data);
    }