code: public function setOutputFormat($format)
      {
          $output = array('xml', 'html', 'text', 'text-main');
          if (!in_array($format, $output)) {
              throw new \InvalidArgumentException(sprintf(
                  'Available output format: %s',
                  implode(', ', $output)
              ));
          }
          $this->outputFormat = $format;
  
          return $this;
      }
docs: Set Output Format
  
  @param string $format
  
  @return ConfigurationInterface