Version 1
[yaffs-website] / vendor / symfony / http-foundation / File / MimeType / MimeTypeGuesserInterface.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\HttpFoundation\File\MimeType;
13
14 use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException;
15 use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException;
16
17 /**
18  * Guesses the mime type of a file.
19  *
20  * @author Bernhard Schussek <bschussek@gmail.com>
21  */
22 interface MimeTypeGuesserInterface
23 {
24     /**
25      * Guesses the mime type of the file with the given path.
26      *
27      * @param string $path The path to the file
28      *
29      * @return string The mime type or NULL, if none could be guessed
30      *
31      * @throws FileNotFoundException If the file does not exist
32      * @throws AccessDeniedException If the file could not be read
33      */
34     public function guess($path);
35 }