Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / file_mdm / file_mdm_exif / src / ExifTagMapperInterface.php
1 <?php
2
3 namespace Drupal\file_mdm_exif;
4
5 /**
6  * Provides an interface for EXIF metadata ifds and tags mapper.
7  */
8 interface ExifTagMapperInterface {
9
10   /**
11    * Resolves a metadata 'key' to the default EXIF IFD and TAG.
12    *
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.
20    *
21    * @return array
22    *   An associative array with the following keys:
23    *     'ifd' - the IFD EXIF integer identifier.
24    *     'tag' - the TAG EXIF integer identifier.
25    *
26    * @throws \Drupal\file_mdm\FileMetadataException
27    *   When wrong argument is passed, or if the IFD/TAG could not be found.
28    */
29   public function resolveKeyToIfdAndTag($key);
30
31   /**
32    * Returns a list of default metadata 'keys' supported.
33    *
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.
40    *
41    * @return array
42    *   A simple array.
43    *   When returning a list of supported IFDs, each array element is a simple
44    *   array with:
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
48    *   simple array with:
49    *     0 => the string identifier of the IFD.
50    *     1 => the string identifier of the TAG.
51    */
52   public function getSupportedKeys(array $options = NULL);
53
54 }