/**
  * (non-PHPdoc).
  *
  * @see \Mathielen\ImportEngine\Storage\Format\Discovery\FormatDiscoverStrategyInterface::getFormat()
  */
 public function getFormat(StorageSelection $selection)
 {
     $mimeType = $this->mimetypeDiscoverer->discoverMimeType($selection->getId());
     list($mimeType, $subInformation) = array_pad(explode(' ', $mimeType), 2, null);
     $type = $this->mimeTypeToFormat($mimeType, $selection->getId(), $subInformation);
     return $type;
 }
 public function getConnection(StorageSelection $selection = null)
 {
     $id = $selection ? $selection->getId() : null;
     if (!$id || !isset($this->connections[$id])) {
         $id = 'default';
     }
     return $this->connections[$id];
 }
 /**
  * (non-PHPdoc).
  *
  * @see \Mathielen\ImportEngine\Storage\Format\Discovery\FormatDiscoverStrategyInterface::getFormat()
  */
 public function getFormat(StorageSelection $selection)
 {
     $ext = pathinfo($selection->getId(), PATHINFO_EXTENSION);
     $type = $this->discoverFormat($ext, $selection->getId());
     return $type;
 }