Set the available file formats - replacing the previous list
@param array $formats Assocative array of mime-type => writer-class pairs
@return DataResponse Provides fluent interface
327882
public function setFileFormats(array $formats)
    {
        $this->file_formats = array();
        foreach ($formats as $mime => $writer)
            $this->addFileFormat($mime, $writer);

        return $this;
    }
1296812
public function setFormat($format) {

        $this->checkInArray($format, GDAXConstants::$reportFormatValues);
        $this->format = $format;
        return $this;

    }
272156
public function addFormat($format, array $mimeTypes, array $extensions = null)
    {
        $this->formats[$format] = [is_null($extensions) ? [$format] : $extensions, $mimeTypes];

        return $this;
    }
306718
protected function setFormat($format = null)
    {
        if ($format == '' && $this->image instanceof Image) {
            $format = $this->image->mime;
        }

        $this->format = $format ? $format : 'jpg';

        return $this;
    }
525208
public function setFormat($format)
    {
        switch ($format) {
            case self::FORMAT_BASE32:
                $this->encoder = new Base32Encoder();
                break;
            case self::FORMAT_HEX:
                $this->encoder = new HexEncoder();
                break;
            case self::FORMAT_RAW:
            default:
                $this->encoder = new RawEncoder();
        }

        return $this;
    }
697210
public function load($data, $format = 'php')
    {
        if (!$data) {
            return $this;
        }

        if (\is_string($data) && \in_array($format, static::$formats, true)) {
            switch ($format) {
                case static::FORMAT_YML:
                    $this->loadYaml($data);
                    break;

                case static::FORMAT_JSON:
                    $this->loadJson($data);
                    break;

                case static::FORMAT_INI:
                    $this->loadIni($data);
                    break;

                case static::FORMAT_PHP:
                default:
                    $this->loadArray($data);
                    break;
            }

        } elseif (\is_array($data) || \is_object($data)) {
            $this->bindData($this->data, $data);
        }

        return $this;
    }
953343
public function format($format)
    {
        $function = $this->localFormatFunction ?: static::$formatFunction;

        if (!$function) {
            return $this->rawFormat($format);
        }

        if (is_string($function) && method_exists($this, $function)) {
            $function = [$this, $function];
        }

        return $function(...func_get_args());
    }
889178
public function setResponseFormat($format)
    {
        $format = strtolower($format);
        if (!in_array($format, array('php', 'json', 'jsonp'))) {
            throw new Exception("Expected a format of php, json or jsonp, got '$format'");
        } else {
            $this->responseFormat = $format;
        }
    }
41238
public function addFormat($format, $mime_types)
    {
        static::$_formats[$format] = is_array($mime_types) ? $mime_types : array($mime_types);
        return $this;
    }
1099597
public function setFormat($format)
    {
        $this->format = (string) $format;

        foreach ($this->items as $time) {

            $time->setFormat($format);
        }

        return $this;
    }
913260
public function setFilterFormat(string $format = 'DD MMM YY'): ColumnInterface
    {
        $this->filter[self::FILTER_KEY_FORMAT] = $format;

        return $this;
    }
388149
public function setFormat($format)
    {
        if($format)
        {
            if(!isset(static::$_formats[$format])) {
                throw new \UnexpectedValueException('Unregistered format: "' . $format . '" given.');
            }

            $this->_format = $format;
        }

        return $this;
    }
311726
public function setEmailFormat($format)
    {
        if (!in_array($format, $this->_emailFormatAvailable)) {
            throw new InvalidArgumentException('Format not available.');
        }
        $this->_emailFormat = $format;

        return $this;
    }
505992
public function setFormat($format)
    {
        $this->_format = $format;
        // Use formatter content type if exists
        if (isset($this->contentTypes[$this->_format])) {
            $this->ci->output
                ->set_content_type($this->contentTypes[$this->_format]);
        }

        return $this;
    }
1010236
public function setWorkingDays(array $days, $format = null)
    {
        $this->workingDays = $days;
        if ($format) {
            $this->formatWorkingDays = $format;
        }
        return $this;
    }
921077
protected function add_format($format) {
        if (in_array($format, $this->supportedformats)) {
            return;
        }
        $this->supportedformats = portfolio_most_specific_formats(array($format), $this->supportedformats);
    }
929780
public function setFormat($format)
    {
        $this->format = $format;
        if ($this->format === self::FORMAT_UNIX) {
            $this->newline = "\n";
        } elseif ($this->format === self::FORMAT_DOS) {
            $this->newline = "\r\n";
        }
    }