public function getMediaType() { $ret = null; $contentType = $this->getContentType(); if ($contentType) { $parts = preg_split('/\\s*[;,]\\s*/', $contentType, 2); $ret = strtolower($parts[0]); } return $ret; }