@param string                                     $url
@param string|\Closure|MiddlewareInterface|Router $callback

@throws RouterException

@return Route
437391
public function post(string $url, $callback): Route
    {
        $route = new Route(['POST'], $url, $callback);
        $this->addRoute($route);

        return $route;
    }
136638
public function middleware(...$middleware): Router
    {
        foreach ($middleware as $handler) {
            $this->chains[] = $handler;
        }

        return $this;
    }
1056273
public static function post($url, $callback)
    {
        $route = new self($url);
        $route->setClosure($callback);
        $route->setMethod('post');

        $route->add();

        return $route;
    }
1118124
public static function getBacklink($url, ServerRequest $request)
    {
        if (!isset($url['plugin'])) {
            $url['plugin'] = $request->getParam('plugin');
        }
        if (!isset($url['controller'])) {
            $url['controller'] = $request->getParam('controller');
        }

        $path = join('.', [
            'FILTER_' . ($url['plugin'] ? $url['plugin'] : ''),
            $url['controller'],
            $url['action']
        ]);

        if (($filterOptions = $request->getSession()->read($path))) {
            if (isset($filterOptions['slug'])) {
                $url['sluggedFilter'] = $filterOptions['slug'];
                unset($filterOptions['slug']);
            }
            if (!empty($filterOptions)) {
                if (!isset($url['?'])) {
                    $url['?'] = [];
                }
                $url['?'] = array_merge($url['?'], $filterOptions);
            }
        }

        return $url;
    }
16995
public static function routes($callback = null, array $options = [])
    {
        $callback = $callback ?: function ($router) {
            $router->all();
        };

        $defaultOptions = [
            'prefix' => 'oauth',
            'namespace' => '\MoeenBasra\LaravelPassportMongoDB\Http\Controllers',
        ];

        $options = array_merge($defaultOptions, $options);

        Route::group($options, function ($router) use ($callback) {
            $callback(new RouteRegistrar($router));
        });
    }
1245175
function post($url, $data, $callback = null)
    {
        $ret = new CoURLResult($url, $callback, $this->handle);
        $ret->method = self::METHOD_POST;
        $ret->data = $data;
        $this->requests[$ret->id] = $ret;
        return $ret;
    }
302423
public function post(String $path, Callable $callback) : Route {

		return $this->collectRoute('POST', $path, $callback);

	}
533881
public function route(string $method, string $path, callable $callback, int $priority = 0)
    {
        $this->getRouter()->route($method, $path, $callback, $priority);

        return $this;
    }
999004
public function patch(string $url, $callback): Route
    {
        $route = new Route(['PATCH'], $url, $callback);
        $this->addRoute($route);

        return $route;
    }
670991
function reroute($url=NULL,$permanent=FALSE) {
		if (!$url)
			$url=$this->hive['REALM'];
		if (preg_match('/^(?:@(\w+)(?:(\(.+?)\))*)/',$url,$parts)) {
			if (empty($this->hive['ALIASES'][$parts[1]]))
				user_error(sprintf(self::E_Named,$parts[1]),E_USER_ERROR);
			$url=$this->hive['ALIASES'][$parts[1]];
		}
		$url=$this->build($url,
			isset($parts[2])?$this->parse($parts[2]):array());
		if (($handler=$this->hive['ONREROUTE']) &&
			$this->call($handler,array($url,$permanent))!==FALSE)
			return;
		if ($url[0]=='/')
			$url=$this->hive['BASE'].$url;
		if (PHP_SAPI!='cli') {
			header('Location: '.$url);
			$this->status($permanent?301:302);
			die;
		}
		$this->mock('GET '.$url);
	}
1026308
public function map($method, $match, $callback)
    {
        $match = $this->base . $match;
        /** @var Route $route */
        $route = $this->routeService
            ->attach($method, $match, $callback)
            ->setGroup($this);
        return $route;
    }
916776
public static function any( $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( $args[ 'route' ], $args[ 'callback' ] );
	}
502104
public function group(string $prefix, callable $callback): RouteGroup
    {
        $prefix = ($prefix === '/') ? $this->prefix : rtrim($this->prefix, '/') . sprintf('/%s', ltrim($prefix, '/'));

        $group = $this->router->group($prefix, $callback);

        // in cases of group of groups, we need to persist the settings from the previous group in the new one.
        if ($host = $this->getHost()) {
            $group->setHost($host);
        }
        if ($scheme = $this->getScheme()) {
            $group->setScheme($scheme);
        }
        if ($port = $this->getPort()) {
            $group->setPort($port);
        }
        if ($strategy = $this->getStrategy()) {
            $group->setStrategy($strategy);
        }

        // merge all the previous group middlewares in this last group.
        $group->middleware(array_merge($this->getMiddlewareStack(), $group->getMiddlewareStack()));

        return $group;
    }
606629
protected function createRoute($methods, $pattern, $callable)
    {
        $route = new Route($methods, $pattern, $callable, $this->routeGroups, $this->routeCounter);
        if ($this->callbackResolver) {
            $route->setCallbackResolver($this->callbackResolver);
        }

        return $route;
    }
1166545
private function init($uri, $callback)
    {

        try {
            /**
             * check if there is a general type validation
             * can throw an exception
             */
            $this->validate($uri);

            switch (true) {
                /**
                 * check if the routing maps to an object via array or class
                 */
                case (is_array($callback) || (is_object($callback) && !is_callable($callback))) :
                    $this->setType(self::TYPE_O);
                    $this->strategy = StrategyFactory::make(self::TYPE_O, $callback, new RouteMethodAnnotaionParser());
                    break;

                /**
                 * maps a simple function
                 */
                case (is_string($callback)) :
                    $this->setType(self::TYPE_F);
                    $this->strategy = StrategyFactory::make(self::TYPE_F, $callback);

                    if (!function_exists($callback)) {
                        throw new RouteException(sprintf(_('There is no such Function like %s'), $callback));
                    }
                    break;

                /**
                 * Closure callback
                 */
                case (is_callable($callback)) :
                    $this->setType(self::TYPE_LF);
                    $this->strategy = StrategyFactory::make(self::TYPE_LF, $callback);
                    break;
            }
        } catch (RouteException $e) {
            throw $e;
        }

        return true;
    }
68199
public static function routes($callback)
    {
        $attributes = array_merge(
            [
                'prefix'     => config('admin.route.prefix'),
                'middleware' => config('admin.route.middleware'),
            ],
            static::config('route', [])
        );

        Route::group($attributes, $callback);
    }
1136805
public function prepareGet($url, $callback = null, $referer = '') {
        if (!$this->inUsed) {
            $this->inUsed = true;
            $options      = [
                CURLOPT_URL         => $url,
                CURLOPT_POST        => 0,
                CURLOPT_AUTOREFERER => 1,
                CURLOPT_POSTFIELDS  => null,
                CURLOPT_REFERER     => $referer,
                CURLOPT_HTTPGET     => 1
            ];
            curl_setopt_array($this->ch, $options);
            $this->mcallback = $callback;

            return $this;
        }

        return null;
    }