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