public function addMiddleware(string $name, MiddlewareInterface $middleware): self
    {
        $this->container[$name] = $middleware;
        array_unshift($this->middleware, $name);

        return $this;
    }