You are here

interface MimeDetectorInterface in MimeDetect 8

An interface for all MimeDetector type plugins.

Hierarchy

Expanded class hierarchy of MimeDetectorInterface

All classes that implement MimeDetectorInterface

File

src/MimeDetectorInterface.php, line 8

Namespace

Drupal\mimedetect
View source
interface MimeDetectorInterface {

  /**
   * Provide a description of the detector.
   *
   * @return string
   *   The MIME detector description.
   */
  public function description();

  /**
   * Try MIME detection on a given file.
   *
   * @param string $path
   *   Path of the file to be analyzed.
   *
   * @return string
   *   The detected MIME, NULL if file contents are not recognized.
   */
  public function detect($path);

}

Members

Namesort descending Modifiers Type Description Overrides
MimeDetectorInterface::description public function Provide a description of the detector. 1
MimeDetectorInterface::detect public function Try MIME detection on a given file. 1