Same name in other branches
  1. 7.x-1.x ExifFactory.php \Drupal\exif\ExifFactory::getExifInterface()
  2. 8.x-2.x src/ExifFactory.php \Drupal\exif\ExifFactory::getExifInterface()

Return configured exif parser.

Return value

\Drupal\exif\ExifInterface configured exif parser

6 calls to ExifFactory::getExifInterface()
ExifContent::checkTitle dans src/ExifContent.php
Allow to fill the title with exif data.
ExifContent::entity_insert_update dans src/ExifContent.php
Main entry of the module.
ExifContent::getDataFromFileUri dans src/ExifContent.php
Retrieve all metadata values from an image.
ExifFieldWidgetBase::retrieveExifFields dans src/Plugin/Field/FieldWidget/ExifFieldWidgetBase.php
List of possible fields.
ExifHelp::content dans src/ExifHelp.php
Return the content of the page.

... See full list

Fichier

src/ExifFactory.php, line 33

Classe

ExifFactory
Class ExifFactory allow to get right implementation.

Namespace

Drupal\exif

Code

public static function getExifInterface() {
    $config = Drupal::configFactory()->get('exif.settings');
    $extractionSolution = $config->get('extraction_solution');
    $useExifToolSimple = $extractionSolution == "simple_exiftool";
    if (isset($useExifToolSimple) && $useExifToolSimple && SimpleExifToolFacade::checkConfiguration()) {
        return SimpleExifToolFacade::getInstance();
    }
    else {
        // Default case for now (same behavior as previous versions)
        return ExifPHPExtension::getInstance();
    }
}