/** * Set format * @param fileFormat $format * @return media */ public function setFormat(fileFormat $format = null) { $this->format = $format; if ($format != null) { $format->addMedia_reverse($this); } else { $format->removeMedia_reverse($this); } return $this; }