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

Translate all keys to lowercase.

ExiffTool is case sensitive. the module is not. So we need to lowercase all keys to be able to get the needed values.

Paramètres

array $data: Values by keys.

Return value

array same values with lowercase keys.

1 call to SimpleExifToolFacade::toLowerJsonResult()
SimpleExifToolFacade::readAllInformation dans src/SimpleExifToolFacade.php
Retrieve all metadata using exifTool.

Fichier

src/SimpleExifToolFacade.php, line 200

Classe

SimpleExifToolFacade
Class SimpleExifToolFacade.

Namespace

Drupal\exif

Code

private function toLowerJsonResult(array $data) {
    $result = [];
    foreach ($data as $section => $values) {
        if (is_array($values)) {
            $result[strtolower($section)] = array_change_key_case($values);
        }
        else {
            $result[strtolower($section)] = $values;
        }
    }
    return $result;
}