Core\Mime
Finds out what kind of file some bytes are, such as a PNG image or a PDF, by reading the first bytes. detect returns a Core\Mime::Type case, and mediaType gives its name, such as image/png.
Members
2 members.
| Member | Signature |
|---|---|
detect | detect(Core\Bytes::Source $data): Core\Mime::Type |
mediaType | mediaType(Core\Mime::Type $type): string |
Enums
TypeThe kind of file thatCore\Mime::detectfound in some bytes. The list of cases is fixed, so your program compares the result with a case. Every text format givesUnknown.
