Document/MediaViewObject.php
public function setFormats($formats)
    {
        if (is_array($formats)) {
            $formats = json_encode($formats);
        }

        $this->formats = $formats;

        return $this;
    }
public function setFormats($formats)
    {
        if (is_array($formats)) {
            $formats = json_encode($formats);
        }

        $this->formats = $formats;

        return $this;
    }
public function setFormats ( $ formats ) { if ( is_array ( $ formats ) ) { $ formats = json_encode ( $ formats ) ; } $ this -> formats = $ formats ; return $ this ; }
Set formats.

@param string[] $formats

@return $this
Set formats .