protected function withMiddleware($invoker, $interface, $config)
    {
        if (empty($this->middleware)) {
            return $invoker;
        }

        return new MiddlewareInvoker($this->container, $interface, $invoker, $this->middleware, $config);
    }