code: public function registerStackMiddleware($class)
      {
          if (func_num_args() === 0) {
              throw new \InvalidArgumentException("Missing argument(s) when calling registerStackMiddlerware");
          }
  
          if (! class_exists($class) && ! is_callable($class)) {
              throw new \InvalidArgumentException("{$class} not found or not callable");
          }
  
          call_user_func_array([$this->builder, "push"], func_get_args());
      }
docs: register stack middleware
  @param string $class