You are here

public function ExifPHPExtension::getFieldKeys in Exif 8

Same name and namespace in other branches
  1. 8.2 src/ExifPHPExtension.php \Drupal\exif\ExifPHPExtension::getFieldKeys()
  2. 7 ExifPHPExtension.php \Drupal\exif\ExifPHPExtension::getFieldKeys()

List of known metadata keys.

Metadata combine EXIF and IPTC keys.

Return value

array Metadata Keys.

Overrides ExifInterface::getFieldKeys

File

src/ExifPHPExtension.php, line 792

Class

ExifPHPExtension
Class ExifPHPExtension Parser implementation base d on PHP Exif extension.

Namespace

Drupal\exif

Code

public function getFieldKeys() {
  $exif_keys_temp = $this
    ->getHumanReadableExifKeys();
  $exif_keys = [];
  foreach ($exif_keys_temp as $value) {
    $exif_keys[$value] = $value;
  }
  $iptc_keys_temp = array_values($this
    ->getHumanReadableIptcDescriptions());
  $iptc_keys = [];
  foreach ($iptc_keys_temp as $value) {
    $current_value = "iptc_" . $value;
    $iptc_keys[$current_value] = $current_value;
  }
  $fields = array_merge($exif_keys, $iptc_keys);
  ksort($fields);
  return $fields;
}