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

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

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

@param string     $format
@param array      $mimeTypes
@param array|null $extensions

@return self
Add a new format .