public function getMimeTypeFromFile($file)
	{
		$extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));
		if (array_key_exists($extension, $this->_alt_mime_types)) {
			return $this->_alt_mime_types[$extension];
		} else {
			return (new \Finfo(FILEINFO_MIME_TYPE))->file($file);
		}
	}
public function getMimeTypeFromFile($file)
	{
		$extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));
		if (array_key_exists($extension, $this->_alt_mime_types)) {
			return $this->_alt_mime_types[$extension];
		} else {
			return (new \Finfo(FILEINFO_MIME_TYPE))->file($file);
		}
	}
public function getMimeTypeFromFile ( $ file ) { $ extension = strtolower ( pathinfo ( $ file , PATHINFO_EXTENSION ) ) ; if ( array_key_exists ( $ extension , $ this -> _alt_mime_types ) ) { return $ this -> _alt_mime_types [ $ extension ] ; } else { return ( new \ Finfo ( FILEINFO_MIME_TYPE ) ) -> file ( $ file ) ; } }
Get mime-type from file.
Checks extensions array first, then attempts to get mime-type using Finfo

@param  string $file Path to file
@return string       Mime-type
Get mime - type from file . Checks extensions array first then attempts to get mime - type using Finfo