ExifFactory.php in Exif 8.2
File
src/ExifFactory.php
View source
<?php
namespace Drupal\exif;
use Drupal;
class ExifFactory {
public static function getExtractionSolutions() {
return [
"simple_exiftool" => "exiftool",
"php_extensions" => "php extensions",
];
}
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 {
return ExifPHPExtension::getInstance();
}
}
}
Classes
Name |
Description |
ExifFactory |
Class ExifFactory allow to get right implementation. |