Files
web-site/Internal/package-image/MimeTypeFinder.php
T
2026-07-01 16:44:17 +03:00

28 lines
553 B
PHP

<?php namespace ZN\Image;
/**
* ZN PHP Web Framework
*
* "Simplicity is the ultimate sophistication." ~ Da Vinci
*
* @package ZN
* @license MIT [http://opensource.org/licenses/MIT]
* @author Ozan UYKUN [ozan@znframework.com]
*/
use ZN\Singleton;
class MimeTypeFinder
{
/**
* Finder mime type.
*
* @param string $file
*/
public static function get($file)
{
$type = str_replace('image/', '', Singleton::class('ZN\Helpers\Mime')->type($file));
return $type === 'jpg' ? 'jpeg' : $type;
}
}