3 namespace Drupal\file_mdm_exif;
6 * Provides an interface for EXIF metadata ifds and tags mapper.
8 interface ExifTagMapperInterface {
11 * Resolves a metadata 'key' to the default EXIF IFD and TAG.
13 * @param string|array $key
14 * A metadata 'key' as passed in by the file metadata manager. It can be a
15 * string, in which case the default IFD and TAG are returned. If it is an
16 * array, then the first and the second array elements define respectively
17 * the IFD and the TAG requested. IFD and TAG can be strings, in which case
18 * they are converted to EXIF integer identifiers, or integers, in which
19 * case they are returned as such.
22 * An associative array with the following keys:
23 * 'ifd' - the IFD EXIF integer identifier.
24 * 'tag' - the TAG EXIF integer identifier.
26 * @throws \Drupal\file_mdm\FileMetadataException
27 * When wrong argument is passed, or if the IFD/TAG could not be found.
29 public function resolveKeyToIfdAndTag($key);
32 * Returns a list of default metadata 'keys' supported.
34 * @param array $options
35 * (optional) If specified, restricts the results returned. By default, all
36 * the available EXIF IFD/TAG combinations for any IFD are returned.
37 * If $options contains ['ifds' => TRUE], the supported IFDs are returned.
38 * If $options contains ['ifd' => $value], the IFD/TAG combinations
39 * supported by the IFD specified by $value are returned.
43 * When returning a list of supported IFDs, each array element is a simple
45 * 0 => the default string identifier of the IFD.
46 * 1 => the integer identifier of the IFD.
47 * When returning a list of supported IFD/TAGs, each array element is a
49 * 0 => the string identifier of the IFD.
50 * 1 => the string identifier of the TAG.
52 public function getSupportedKeys(array $options = NULL);