vendor/kunstmaan/media-bundle/Helper/ExtensionGuesserFactory.php line 21

Open in your IDE?
  1. <?php
  2. namespace Kunstmaan\MediaBundle\Helper;
  3. use Kunstmaan\MediaBundle\Helper\File\SVGExtensionGuesser;
  4. use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser;
  5. use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesserInterface;
  6. class ExtensionGuesserFactory implements ExtensionGuesserFactoryInterface
  7. {
  8.     /**
  9.      * Should return an extension guesser instance, used for file uploads
  10.      *
  11.      * NOTE: If you override this, you'll probably still have to register the SVGExtensionGuesser as last guesser...
  12.      *
  13.      * @return ExtensionGuesserInterface
  14.      */
  15.     public function get()
  16.     {
  17.         $guesser ExtensionGuesser::getInstance();
  18.         $guesser->register(new SVGExtensionGuesser());
  19.         return $guesser;
  20.     }
  21. }