Set routers options JWT.

@todo add Middleware that the router will call
@param array $route
@param array $options
@return void
173380
private function setOptions(array $route, array $options): void
    {
        if (array_key_exists('jwt', $options['options'])) {
            //only add if we want to ignore this url
            if (!$options['options']['jwt']) {
                self::$hasJwtOptionsSetup = true;
                //we group them by method and hash the pattern to make it a faster lookup
                self::$jwt[strtoupper($route['method'])][md5($this->prefix . $route['pattern'])] = $this->prefix . $route['pattern'];
            }
        }
    }
1236762
public function setOptions(array $options = []) : void
    {
        $default = [
            "dsn"             => null,
            "username"        => null,
            "password"        => null,
            "driver_options"  => null,
            "table_prefix"    => null,
            "fetch_mode"      => \PDO::FETCH_OBJ,
            "emulate_prepares" => false,
            "session_key"     => "Anax\Database",
            "verbose"         => false,
            "debug_connect"   => false,
        ];

        $this->options = array_merge($default, $options);
    }
207326
public function setRedirectUrl($options)
    {
        $this->redirectUrl = array(
            404 => !isset($options[404]) ? '' : $options[404],
            405 => !isset($options[405]) ? '' : $options[405]
        );
    }
632130
public function add(Route $route, array $params = [])
    {
        $callback = $route->getCallable();
        if (empty($callback)) {
            return;
        }

        $this->routes[] = $route->getRoute();
        $paramNames = $route->getParamNames();
        foreach ($paramNames as $name) {
            if (isset($params[$name])) {
                $this->setParam($name, $params[$name]);
            }
        }

        if (is_array($callback)) {
            $this->callable = array_merge($this->callable, $callback);
        } elseif (!in_array($callback, $this->callable)) {
            $this->callable[] = $callback;
        }
    }
1186496
public function setOptions(array $options)
    {
        $availableOptions = [
            'default',
            'group',
            'key',
            'message',
            'messages',
            'rules'
        ];

        foreach ($availableOptions as $option) {
            if (isset($options[$option])) {
                $this->$option = $options[$option];
            }
        }
    }
1308670
public function execute(Routes $routes): void
	{
		$routeCollection = [];

		// Build table rows

		foreach($routes->getRoutes() as $route)
		{
			// Normalize action name

			$action = ($route->getAction() instanceof Closure) ? 'Closure' : $route->getAction();

			// Build table row

			$routeCollection[] =
			[
				$route->getRoute(),
				implode(', ', $route->getMethods()),
				$action,
				implode(', ', $route->getMiddleware()),
				implode(', ', $route->getConstraints()),
				(string) $route->getName(),
			];
		}

		// Draw table

		$headers =
		[
			'<green>Route</green>',
			'<green>Allowed methods</green>',
			'<green>Action</green>',
			'<green>Middleware *</green>',
			'<green>Constraints **</green>',
			'<green>Name</green>',
		];

		$this->table($headers, $routeCollection);

		$this->write('<green>*</green> <faded>Global middleware is not listed.</faded>');
		$this->write('<green>**</green> <faded>Global constraints are not listed.</faded>');
	}
502778
protected function prepareValidRoute(string $route, ?string $item, string $query, array $options): string
    {
        $appends = [];
        $mode = $this->mode();

        if ((bool) ($options['csrf'] ?? false)) {
            $appends['_token'] = $this->getCsrfToken();
        }

        if (! in_array($mode, ['normal'])) {
            $appends['_mode'] = $mode;
        }

        $query = $this->prepareHttpQueryString($query, $appends);

        ! empty($item) && $route = "{$route}.{$item}";
        empty($route) && $route = '';
        empty($query) || $route = "{$route}?{$query}";

        return $route;
    }
55014
public static function get($route, $handler, $options = [])
    {
        app()->router->get($route, $handler, $options);
    }
802931
public function setRoutes() : void
    {
        if (is_null($this->routes)) {
            $this->routes = [];
            $routesConfig = $this->config->getParam('routes') ?? [];
            foreach ($routesConfig as $routeName => $routeArr) {
                $route = new Route(
                    $routeName,
                    $routeArr['methods'],
                    $routeArr['path'],
                    $routeArr['params_defaults'],
                    $routeArr['params_requirements'],
                    $routeArr['handler'],
                    $routeArr['handler_method'] ?? null
                );
                $this->routes[] = $route;
            }
        }
    }
481518
protected function setFoundMiddleware(Route $route) : void
    {
        if (is_null($route->getStrategy())) {
            $route->setStrategy($this->getStrategy());
        }

        // wrap entire dispatch process in exception handler
        $this->prependMiddleware($route->getStrategy()->getExceptionHandler());

        // add group and route specific middleware
        if ($group = $route->getParentGroup()) {
            $this->middlewares($group->getMiddlewareStack());
        }

        $this->middlewares($route->getMiddlewareStack());

        // add actual route to end of stack
        $this->middleware($route);
    }
1221427
public function setMethod($route)
		{
			// variables
			$methodUri      = trim(substr($route, strlen($this->route)), '/');
			$segments       = explode(',', $methodUri);

			// properties
			$this->method    = array_shift($segments);

			// return
			return $this;
		}
646762
public function setOptions(array $options)
    {
        if (isset($options['uniqueId'])) {
            $this->sessionId = $options['uniqueId'];
        }

        $this->options = $options;
    }
485250
protected function storeRoute(array $methods, array $route)
    {
        $this->callbacks[] = (object)$route;
        $index             = count($this->callbacks) - 1;

        if (!isset($this->routes[$route['pattern']])) {
            $this->routes[$route['pattern']] = [];
        }

        if ($route['name']) {
            $this->names[$route['name']] = $index;
        }

        foreach ($methods as $method) {
            $this->routes[$route['pattern']][strtoupper($method)] = $index;
        }
    }
384561
public function init($component, $options = array()) {
		if (isset($component)) {
			$this->setComponent($component);
		}

		$this->setRedirectUrl(Yii::app()->user->returnUrl);
		$server = Yii::app()->request->getHostInfo();
		$path = Yii::app()->request->getPathInfo();
		$this->setCancelUrl($server . '/' . $path);

		foreach ($options as $key => $val) {
			$this->$key = $val;
		}
	}
686594
public function setOptions(array $options)
	{
		if (isset($options['type']))
		{
			$this->type = $options['type'];
		}

		if (isset($options['timeout']))
		{
			$this->timeout = $options['timeout'];
		}

		return true;
	}
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));
        });
    }
295004
private function setRoutes(array $routes)
    {
        $this->routes = [];

        foreach ($routes as $name => $route) {
            $this->add($name, $route);
        }
    }