MimeTypeGuesserInterface.php 831 B

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