public function addRouteMiddleware(string $name): void
    {
        if (!array_key_exists($name, $this->getConfigRouteMiddlewares())) {
            throw new InvalidArgumentException('The middleware [' . $name . '] does not exists.');
        }

        $this->routeMiddlewares[] = $this->getConfigRouteMiddlewares()[$name];
    }