code: public function getMetadata($section = null, $key = null)
      {
          if (null === $section) {
              return $this->metadata;
          }
          foreach ($this->metadata as $md) {
              /** @var MetaData $md */
              if ($section != $md->getSection()) {
                  continue;
              }
              if (null === $key) {
                  return $md;
              }
              foreach ($md->getData() as $k => $data) {
                  if ($key == $k) {
                      return $data;
                  }
              }
              throw new NotFoundException('No metadata with section "' . $section . '" and key "' . $key . '" exists.');
          }
          throw new NotFoundException('No metadata with section "' . $section . '" exists.');
      }
docs: Gets MetaData.
  
  @param string $section The Metadata section to get. Eg. "Exif", "IPTC", etc.
  @param string $key     The Metadata key to get. Eg. "width", "shutterspeed", etc.
  
  @throws NotFoundException thrown if the requested Metadata does not exist
  
  @return MetaData[]|MetaData|string The requested metadata