- $this->baseRoutesFilepath = $baseRoutesFilepath;
- $this->l10n = $l10n;
- $this->cache = $cache;
- $this->lock = $lock;
- $this->args = $args;
- $this->config = $config;
- $this->dice = $dice;
- $this->server = $server;
-
- $httpMethod = $this->server['REQUEST_METHOD'] ?? self::GET;
-
- // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS
- // @todo Check allowed methods per requested path
- if ($httpMethod === static::OPTIONS) {
- header('Allow: ' . implode(',', Router::ALLOWED_METHODS));
- throw new NoContentException();
- }
-
- $this->httpMethod = in_array($httpMethod, self::ALLOWED_METHODS) ? $httpMethod : self::GET;
-
- $this->routeCollector = isset($routeCollector) ?
- $routeCollector :
- new RouteCollector(new Std(), new GroupCountBased());
+ $this->baseRoutesFilepath = $baseRoutesFilepath;
+ $this->l10n = $l10n;
+ $this->cache = $cache;
+ $this->lock = $lock;
+ $this->args = $args;
+ $this->config = $config;
+ $this->dice = $dice;
+ $this->server = $server;
+ $this->logger = $logger;
+ $this->dice_profiler_threshold = $config->get('system', 'dice_profiler_threshold', 0);
+
+ $this->routeCollector = $routeCollector ?? new RouteCollector(new Std(), new GroupCountBased());