/** * Returns the file MIME type. * * @param string $path * * @return array|false|null|string */ public function getMimeType($path) { $ext = pathinfo($path, PATHINFO_EXTENSION); $mimeType = MimeType::detectByFileExtension($ext); return $mimeType ? array('mimetype' => $mimeType) : parent::getMimetype($path); }