public function setFormats($formats) { foreach ($formats as $type => $format) { $this->setFormat($type, $format); } return $this; }