public function getAdapter($mimeTypes)
    {
        $mimeTypes = explode(';', $mimeTypes);

        foreach ($mimeTypes as $mimeType) {
            foreach ($this->adapters as $adapter) {
                if (in_array(ltrim($mimeType), $adapter->getMimeTypes())) {
                    return $adapter;
                }
            }
        }

        throw new \Exception('No adapter found for mime type '.$mimeType);
    }
public function getAdapter($mimeTypes)
    {
        $mimeTypes = explode(';', $mimeTypes);

        foreach ($mimeTypes as $mimeType) {
            foreach ($this->adapters as $adapter) {
                if (in_array(ltrim($mimeType), $adapter->getMimeTypes())) {
                    return $adapter;
                }
            }
        }

        throw new \Exception('No adapter found for mime type '.$mimeType);
    }
public function getAdapter ( $ mimeTypes ) { $ mimeTypes = explode ( ';' , $ mimeTypes ) ; foreach ( $ mimeTypes as $ mimeType ) { foreach ( $ this -> adapters as $ adapter ) { if ( in_array ( ltrim ( $ mimeType ) , $ adapter -> getMimeTypes ( ) ) ) { return $ adapter ; } } } throw new \ Exception ( 'No adapter found for mime type ' . $ mimeType ) ; }
Returns an adapter for a given mime type.

@param string $mimeType

@return AdapterInterface
Returns an adapter for a given mime type .