Lines Matching defs:mime
48 private $mime;
53 public function __construct(string $mime)
55 if (trim($mime) === "") {
56 LogUtility::msg("The mime should not be an empty string");
58 $this->mime = $mime;
61 public static function create(string $mime): Mime
63 return new Mime($mime);
119 throw new ExceptionNotFound("No mime was found for the extension ($extension)");
173 return $this->mime;
182 return array_search($this->mime, self::$knownTypes) !== false;
191 if (in_array($this->mime, [self::SVG, self::JSON])) {
199 return explode("/", $this->mime)[0];
204 return substr($this->mime, 0, 5) === 'image';
215 $secondPart = explode("/", $this->mime)[1];
223 return in_array($this->mime, Mime::RASTER_MIMES);