public function getMimeTypeByExtension()
{
if ($this->getIsFile()) {
$this->addLog('Trying to get MIME type for "' . $this->_realpath . '" from extension "' . $this->_extension . '"', 'trace');
static $exts;
if ($exts === null) {
$exts = (require $this->getPathOfAlias('system.utils.mimeTypes') . '.php');
}
$ext = strtolower($this->_extension);
if (!empty($ext) && isset($exts[$ext])) {
return $exts[$ext];
}
return False;
} else {
$this->addLog('getMimeTypeByExtension() is available only for files', 'warning');
return False;
}
}