Overview

Namespaces

  • Composer
    • Autoload
  • Guzzle
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Mock
    • Stream
  • Mockery
    • Adapter
      • Phpunit
    • CountValidator
    • Exception
    • Generator
      • StringManipulation
        • Pass
    • Loader
    • Matcher
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • Fatzebra
      • Message
  • PHP
  • Symfony
    • Component
      • EventDispatcher
        • Debug
        • DependencyInjection
        • Tests
          • Debug
          • DependencyInjection
      • HttpFoundation
        • File
          • Exception
          • MimeType
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
        • Tests
          • File
            • MimeType
          • Session
            • Attribute
            • Flash
            • Storage
              • Handler
              • Proxy
      • Yaml
        • Exception
        • Tests

Classes

  • ExtensionGuesser
  • FileBinaryMimeTypeGuesser
  • FileinfoMimeTypeGuesser
  • MimeTypeExtensionGuesser
  • MimeTypeGuesser

Interfaces

  • ExtensionGuesserInterface
  • MimeTypeGuesserInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class FileinfoMimeTypeGuesser

Guesses the mime type using the PECL extension FileInfo.

Symfony\Component\HttpFoundation\File\MimeType\FileinfoMimeTypeGuesser implements Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface
Namespace: Symfony\Component\HttpFoundation\File\MimeType
Author: Bernhard Schussek bschussek@gmail.com
Located at File/MimeType/FileinfoMimeTypeGuesser.php
Methods summary
public
# __construct( string $magicFile = null )

Constructor.

Constructor.

Parameters

$magicFile
A magic file to use with the finfo instance

Link

http://www.php.net/manual/en/function.finfo-open.php
public static boolean
# isSupported( )

Returns whether this guesser is supported on the current OS/PHP setup.

Returns whether this guesser is supported on the current OS/PHP setup.

Returns

boolean
public string
# guess( string $path )

Guesses the mime type of the file with the given path.

Guesses the mime type of the file with the given path.

Parameters

$path
The path to the file

Returns

string
The mime type or NULL, if none could be guessed

Throws

Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException
If the file does not exist
Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException
If the file could not be read

Implementation of

Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface::guess()
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen