public function createScope($closure) {
		$newScope = (new static($this->request, $this->result, $this->urlGenerator));
		$newScope->setupParent(
			$this->prefix,
			$this->prefixMatched,
			$this->requestPathOffset,
			$this->params
		);
		$newScope->use($this->middlewares); // Must add middlewares before adding namespace, as the middlewares are already prefixed with namespace.
		$newScope->namespace($this->namespace);
		$closure($newScope);
	}