1 | <?php |
||
14 | class MimeType |
||
15 | { |
||
16 | /** |
||
17 | * Returns the singleton instance. |
||
18 | * |
||
19 | * @return MimeType |
||
20 | */ |
||
21 | public static function getInstance(): MimeType |
||
28 | |||
29 | |||
30 | /** |
||
31 | * Get mime type or NULL, if none could be guessed. |
||
32 | * |
||
33 | * @param string $path Path to the file |
||
34 | * @return string |
||
35 | * @throws \LogicException |
||
36 | * @throws FileNotFoundException |
||
37 | * @throws AccessDeniedException |
||
38 | */ |
||
39 | public function guess(string $path): string |
||
66 | |||
67 | |||
68 | /** |
||
69 | * Registers all natively provided mime type guessers. |
||
70 | */ |
||
71 | private function __construct() |
||
82 | |||
83 | |||
84 | /** |
||
85 | * @var MimeType |
||
86 | */ |
||
87 | private static $instance = null; |
||
88 | |||
89 | private $guesserList; |
||
90 | } |