Same name and namespace in other branches
  1. 7.x-1.x SimpleExiftoolFacade.php \Drupal\exif\SimpleExifToolFacade::readMetadataTags()
  2. 8.x-2.x src/SimpleExifToolFacade.php \Drupal\exif\SimpleExifToolFacade::readMetadataTags()

Retrieve all metadata from a file.

Parameters

string $file: File to read metadata from.

bool $enable_sections: Should sections should be also retrieved.

Return value

array metadata keys and associated values.

Overrides ExifInterface::readMetadataTags

File

src/SimpleExifToolFacade.php, line 79

Class

SimpleExifToolFacade
Class SimpleExifToolFacade.

Namespace

Drupal\exif

Code

public function readMetadataTags($file, $enable_sections = TRUE) {
    if (!file_exists($file)) {
        return [];
    }
    $data = $this->readAllInformation($file, $enable_sections);
    return $data;
}